[Azure][Application Insights agent for Java]Failed to create InProcessTelemetryChannel, null

1.1k views Asked by At

I'm trying to set-up application insights for an running apache tomcat application.

I have followed every step in this tutorial of microsoft: enter link description here But when I start it, I'm getting the following error message.

ERROR 02-01-2017 21:50, 15: Failed to create com.microsoft.applicationinsights.channel.concrete.inprocess.InProcessTelemetryChannel, null

INFO | jvm 1 | 2017/01/02 21:50:53 | Jan 02, 2017 9:50:53 PM org.apache.catalina.core.StandardContext filterStart INFO | jvm 1 | 2017/01/02 21:50:53 | SEVERE: Exception starting filter ApplicationInsightsWebFilter INFO | jvm 1 | 2017/01/02 21:50:53 | java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.impl.conn.ManagedHttpClientConnectionFactory INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.(PoolingHttpClientConnectionManager.java:493) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:149) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:138) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:114) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.(PoolingHttpClientConnectionManager.java:105) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.channel.common.ApacheSender43.(ApacheSender43.java:45) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.channel.common.ApacheSenderFactory.create(ApacheSenderFactory.java:40) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.channel.common.TransmissionNetworkOutput.(TransmissionNetworkOutput.java:95) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.channel.common.TransmissionNetworkOutput.create(TransmissionNetworkOutput.java:85) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.channel.concrete.inprocess.InProcessTelemetryChannelFactory.create(InProcessTelemetryChannelFactory.java:41) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.channel.concrete.inprocess.InProcessTelemetryChannel.initialize(InProcessTelemetryChannel.java:263) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.channel.concrete.inprocess.InProcessTelemetryChannel.(InProcessTelemetryChannel.java:147) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.config.TelemetryConfigurationFactory.setChannel(TelemetryConfigurationFactory.java:396) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.internal.config.TelemetryConfigurationFactory.initialize(TelemetryConfigurationFactory.java:102) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.TelemetryConfiguration.getActive(TelemetryConfiguration.java:74) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter.init(WebRequestTrackingFilter.java:127) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardService.start(StandardService.java:525) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) INFO | jvm 1 | 2017/01/02 21:50:53 | at org.apache.catalina.startup.Catalina.start(Catalina.java:595) INFO | jvm 1 | 2017/01/02 21:50:53 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2017/01/02 21:50:53 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) INFO | jvm 1 | 2017/01/02 21:50:53 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) INFO | jvm 1 | 2017/01/02 21:50:53 | at java.lang.reflect.Method.invoke(Unknown Source) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.servoy.j2db.server.main.WebServer.startWebServer(WebServer.java:30) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.servoy.j2db.server.main.ApplicationServer.startWebServer(ApplicationServer.java:491) INFO | jvm 1 | 2017/01/02 21:50:53 | at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:286)

It mentions that the configuration file has been found succesfully. Also I have setup the ApplicationInsights.xml just as describred in the tutorial.

I'm lost here! Did someone ever encounter the same problem? Or does someone know what I am doing wrong here?

This is the current setup version of tomcat: Screenshot of version

Thanks!

1

There are 1 answers

4
user3129358 On

The class ApplicationInsightsWebFilter is not found: NoClassDefFoundError.

Can you please make sure that all ApplicationInights jars are present in the class path? Try to put them in your WEB-INF/lib folder