2

I followed below article to set up appinsights to java dynamic web project:

Quickstart: Get started with Application Insights in a Java web project

However I get the below mentioned error. Error Stack trace:

Jan 05, 2017 5:40:07 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter ApplicationInsightsWebFilter
java.lang.ClassNotFoundException: com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:383)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:104)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

I have the corresponding jar in build path

Community
  • 1
  • 1
Praveen
  • 166
  • 2
  • 4
  • 13
  • `ClassNotFoundException` Fix it by adding the jar to your classpath – Scary Wombat Jan 06 '17 at 01:48
  • I have It added in the build path. I get this error in spite of that. applicationinsights-web-10.6.jar has the class. – Praveen Jan 06 '17 at 02:40
  • I followed this answer in below article and the classnotfound exception got fixed: http://stackoverflow.com/questions/32787859/classnotfoundexception-even-though-the-jar-containing-the-class-is-properly-pres – Praveen Jan 06 '17 at 04:10

1 Answers1

2

As a summary, seems that you had resolved the issue which might be caused by not automatically loading the added jar files on Tomcat via Eclipse. The solution is that as below.

  1. Move to the Properties > Deployment Assembly of the current project, and check whether the dependencies exists there as Build Path entries or Archives.
  2. Select the current project, and click Project > Clean at the menu bar, then restart the server.
Peter Pan
  • 23,476
  • 4
  • 25
  • 43