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

Java 18 support for Java Agent 3.3.0 #2390

Closed
petergphillips opened this issue Jul 13, 2022 · 3 comments
Closed

Java 18 support for Java Agent 3.3.0 #2390

petergphillips opened this issue Jul 13, 2022 · 3 comments

Comments

@petergphillips
Copy link

We have a number of Java 18 spring boot projects (Spring Boot v2.7.1, Spring v5.3.21) that we've been running successfully with the Java Agent 3.2.11.

We've just tried upgrading to the latest java agent - 3.3.0 but have found that, although the application started up correctly, no data is written to application insights.

By setting selfDiagnostics to DEBUG there are then lots of errors in the logs similar to

2022-07-13 12:31:36.490+01:00 WARN  muzzleMatcher - Instrumentation skipped, mismatched references were found: servlet [class io.opentelemetry.javaagent.instrumentation.servlet.v3_0.Servlet3InstrumentationModule] on jdk.internal.loader.ClassLoaders$AppClassLoader@251a69d7
2022-07-13 12:31:36.492+01:00 WARN  muzzleMatcher - -- <no-source> Failed to generate reference check for: ClassRef: io.opentelemetry.javaagent.instrumentation.servlet.v3_0.Servlet3Accessor$Listener extends java.lang.Object implements javax.servlet.AsyncListener on classloader jdk.internal.loader.ClassLoaders$AppClassLoader@251a69d7
java.lang.IllegalArgumentException: Unsupported class file major version 62
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
	at net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:101)
	at net.bytebuddy.pool.TypePool$Default.parse(TypePool.java:855)
	at net.bytebuddy.pool.TypePool$Default.doDescribe(TypePool.java:841)
	at io.opentelemetry.javaagent.tooling.muzzle.AgentCachingPoolStrategy$AgentTypePool.doResolve(AgentCachingPoolStrategy.java:335)

I've tried running the java agent 3.3.0 with Java 17 for our project and it pushes successfully to application insights, so it looks like an incompatibility with Java 18 has been introduced when moving to the java agent 3.3.0 from 3.2.11.

One odd thing is that objectweb asm has supported Java 18 for over a year now and that the latest version of bytebuddy (9.3) pulls in that latest version.

I can't find anything in the release notes / documentation either to suggest that Java 18 isn't supported, just that Java 8+ is supported. Java 18 was released in March 2022 so I was therefore expecting it to be a supported environment.

@ghost ghost added the Needs: Triage 🔍 label Jul 13, 2022
@petergphillips
Copy link
Author

Looking at build.gradle.kts it looks like byte buddy 1.12.10 is being pulled in, which includes objectweb asm 9.3 so Java 18 should then be supported.

@trask
Copy link
Member

trask commented Jul 13, 2022

thx for reporting this! we'll add Java 18 to our smoke tests (#2391), it does look like there's some issue that we'll need to track down

@trask
Copy link
Member

trask commented Jul 20, 2022

hi @petergphillips! this is resolved now by #2391 and will be in the upcoming 3.3.1 release

@trask trask closed this as completed Jul 20, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants