Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load log handler "com.microsoft.applicationinsights.TelemetryClient" - AI 3.5.2 in Java #3689

Closed
prapalav opened this issue May 8, 2024 · 2 comments

Comments

@prapalav
Copy link

prapalav commented May 8, 2024

Expected behavior

No error.

Actual behavior

2024-05-09 00:08:32.520+05:30 WARN c.a.c.h.netty.implementation.Utility - The following Netty dependencies have versions that do not match the versions specified in the azure-core-http-netty pom.xml file. This may result in unexpected behavior. If your application runs without issue this message can be ignored, otherwise please update the Netty dependencies to match the versions specified in the pom.xml file. Versions found in runtime: 'io.netty:netty-common' version not found (expected: 4.1.101.Final),'io.netty:netty-handler' version not found (expected: 4.1.101.Final),'io.netty:netty-handler-proxy' version not found (expected: 4.1.101.Final),'io.netty:netty-buffer' version not found (expected: 4.1.101.Final),'io.netty:netty-codec' version not found (expected: 4.1.101.Final),'io.netty:netty-codec-http' version not found (expected: 4.1.101.Final),'io.netty:netty-codec-http2' version not found (expected: 4.1.101.Final)
2024-05-09 00:08:40.416+05:30 INFO c.m.applicationinsights.agent - Application Insights Java Agent 3.5.2 started successfully (PID 36100, JVM running for 14.524 s)
2024-05-09 00:08:40.418+05:30 INFO c.m.applicationinsights.agent - Java version: 1.8.0_202, vendor: Oracle Corporation, home: C:\Program Files\Java\jdk1.8.0_202\jre
Can't load log handler "com.microsoft.applicationinsights.TelemetryClient"
java.lang.ClassNotFoundException: com.microsoft.applicationinsights.TelemetryClient
java.lang.ClassNotFoundException: com.microsoft.applicationinsights.TelemetryClient
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.util.logging.LogManager$5.run(LogManager.java:965)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:958)
at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1578)
at java.util.logging.LogManager.access$1500(LogManager.java:145)
at java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:1667)
at java.util.logging.Logger.getHandlers(Logger.java:1777)
at java.util.logging.Logger.log(Logger.java:735)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.log(Logger.java:788)
at java.util.logging.Logger.info(Logger.java:1490)

The application is simple hello world type. No maven or gradle. AI jar is kept in subfolder lib in root folder. Added corresponding config file with connection string. Added VM argument to point to java agent 3.5.2 jar. Application produced output as expected but got this error also.

To Reproduce

Submitting a PR with an example reproducing the issue in this repository would make it easier for the Application Insight maintainers to help you. Before doing this, you have to fork this repository.

System information

Please provide the following information:

  • SDK Version: 3.5.2
  • OS type and version: Windows 11
  • Application Server type and version (if applicable):
  • Using spring-boot? No
  • Additional relevant libraries (with version, if applicable): JDK 8

Logs

Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.

Be sure to remove any private information from the logs before posting!

Screenshots

If applicable, add screenshots to help explain your problem.

@trask
Copy link
Member

trask commented May 8, 2024

hi @prapalav! I don't think I've seen this error before, can you create a github repository with a small repro that we can run and troubleshoot the issue?

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants