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

Mesmer agent fails with ClassNotFoundException #785

Open
will-sargent-eero opened this issue Mar 20, 2024 · 0 comments
Open

Mesmer agent fails with ClassNotFoundException #785

will-sargent-eero opened this issue Mar 20, 2024 · 0 comments

Comments

@will-sargent-eero
Copy link

will-sargent-eero commented Mar 20, 2024

I am using javaagent 1.32.1-aws with mesmer 0.9.0 using -Dotel.javaagent.extensions=mesmer/mesmer-otel-extension.jar

When I start the agent, I get the following stacktrace

Exception in thread "Thread-8" java.lang.NoClassDefFoundError: io/scalac/mesmer/core/module/Module
	at io.scalac.mesmer.otelextension.instrumentations.akka.stream.AkkaStreamMonitorExtension$.register(AkkaStreamMonitorExtension.scala:204)
	at io.scalac.mesmer.otelextension.instrumentations.akka.stream.AkkaStreamMonitorExtension$.$anonfun$registerWhenSystemIsInitialized$2(AkkaStreamMonitorExtension.scala:196)
	at scala.util.Try$.apply(Try.scala:210)
	at io.scalac.mesmer.core.util.Retry$.retry(Retry.scala:11)
	at io.scalac.mesmer.core.util.Retry$.retryWithPrecondition(Retry.scala:25)
	at io.scalac.mesmer.otelextension.instrumentations.akka.stream.AkkaStreamMonitorExtension$.io$scalac$mesmer$otelextension$instrumentations$akka$stream$AkkaStreamMonitorExtension$$registerWhenSystemIsInitialized(AkkaStreamMonitorExtension.scala:196)
	at io.scalac.mesmer.otelextension.instrumentations.akka.stream.AkkaStreamMonitorExtension$$anon$1.run(AkkaStreamMonitorExtension.scala:191)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: io.scalac.mesmer.core.module.Module
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 8 more

Opening up the jar assembly shows that io.scalac.mesmer.core.module.Module is present, so I think it's a classloader issue -- or, potentially, it doesn't work with a version after 1.24.

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

No branches or pull requests

1 participant