-
Notifications
You must be signed in to change notification settings - Fork 12
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
Launch issues: Jackson dependencies + NoClassDefFoundError #486
Comments
Following-up, I think that I've managed to address the first issue by excluding one transient dependency: "io.scalac" %% "mesmer-akka-extension" % "0.7.0"
exclude (org = "com.fasterxml.jackson.module", name = "jackson-module-scala_2.13"), |
In our case unfortunately it is, with the following dependency configuration the app starts up: "io.scalac" %% "mesmer-akka-extension" % "0.8.0.RC1"
exclude (org = "com.fasterxml.jackson.module", name = "jackson-module-scala_2.13"), "Unfortunately" is because I'd be reluctant to add a dependency with |
I've figured it out for the version part. It was code 18 🙂 . The thing is that I had another "io.scalac" %% "mesmer-akka-extension" % "0.7.0"
exclude (org = "com.fasterxml.jackson.module", name = "jackson-module-scala_2.13"), ...but now the system exits with another [error] Uncaught error from thread [my-app-akka.actor.default-dispatcher-7]: io/opentelemetry/instrumentation/api/field/VirtualField, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[my-app]
[error] java.lang.NoClassDefFoundError: io/opentelemetry/instrumentation/api/field/VirtualField
[error] at io.scalac.mesmer.core.actor.ActorCellDecorator$.getMetrics(ActorCellDecorator.scala:10)
[error] at io.scalac.mesmer.core.actor.ActorCellDecorator$.getMetrics(ActorCellDecorator.scala:14)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor$ReflectiveActorMetricsReader$.$anonfun$read$1(ActorEventsMonitorActor.scala:97)
[error] at scala.Option.flatMap(Option.scala:283)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor$ReflectiveActorMetricsReader$.read(ActorEventsMonitorActor.scala:96)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor.$anonfun$update$1(ActorEventsMonitorActor.scala:238)
[error] at io.scalac.mesmer.extension.util.Tree$TreeFOps$.innerFoldRight$extension(Tree.scala:24)
[error] at io.scalac.mesmer.extension.util.Tree$TreeFOps$.$anonfun$foldRight$1(Tree.scala:26)
[error] at io.scalac.mesmer.extension.util.Tree$TreeFOps$.$anonfun$foldRight$1$adapted(Tree.scala:26)
[error] at scala.collection.immutable.Vector1.map(Vector.scala:1872)
[error] at scala.collection.immutable.Vector1.map(Vector.scala:375)
[error] at io.scalac.mesmer.extension.util.TreeF.map(Tree.scala:9)
[error] at io.scalac.mesmer.extension.util.Tree$TreeFOps$.foldRight$extension(Tree.scala:26)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor.io$scalac$mesmer$extension$ActorEventsMonitorActor$$update(ActorEventsMonitorActor.scala:230)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor$$anonfun$io$scalac$mesmer$extension$ActorEventsMonitorActor$$receive$1.applyOrElse(ActorEventsMonitorActor.scala:208)
[error] at io.scalac.mesmer.extension.ActorEventsMonitorActor$$anonfun$io$scalac$mesmer$extension$ActorEventsMonitorActor$$receive$1.applyOrElse(ActorEventsMonitorActor.scala:198)
[error] at akka.actor.typed.scaladsl.Behaviors$.$anonfun$receiveMessagePartial$1(Behaviors.scala:139) I initially was attaching the opentelemetry java agent version |
@lgajowy Could you please confirm that using the |
The reason for the NoClassDefFound errors might be that the opentelemetry agent has not loaded the classes. We typically add them in BTW: As you can see we are doing it manually so probably we missed some classes. Opentelemetry-java-instrumentation project does that automatically with a "Muzzle Gradle Plugin". This is one of the reasons we want to migrate the project to gradle, hopefully avoiding such errors. I honestly don't know from the top of my head why you get the error for VirtualFields. Those are part of opentelemetry so they should be there in the agent for you. I'd need to investigate that further. In version 0.8.0.RC1 the metrics were redone - our goal was to remove the Akka extension. So that might be why you don't see the errors - the internals were simplified/refactored. When it comes to using 0.8.0.RC1 version: let me know if you need actors_terminated, mailbox_size and akka Streaming metrics. If no, then you're probably good to use it. If yes, then you'd need to wait for RC2/ next version where I will reinstate the above-mentioned metrics (there are some problems with displaying them now). We might alternatively create a 0.7.1 patched version for you if the issue is urgent (lmk pls). Sorry for the inconvenience. |
Hey @lgajowy, thanks for following-up! If you could cut a patch release (0.7.1) that would certainly be preferable then using a *RC version. |
Hello all!
We have an Akka app that declares the following related dependencies:
I try to run the app through
sbt
, so I have a dedicated runner in mybuild.sbt
file:When running the application with
sbt clean runWithObservability
I get the following errors. First there seems to be a conflict with Jackson libraries:Analyzing the dependency tree I observe that the
2.11.4
dependencies are being brought in by Mesmer's transitive akka-serialization-jackson dependency (not all dependencies shown):Besides that I'm having this thrown at the startup:
despite having carried out the prerequisites from the Getting Started guide:
mesmer-akka-extension
dependency added-Dotel.javaagent.extensions
flag added to the run commandsbt reload
to make sure that all dependencies are downloaded.After removing both the dependency and the reference to the agent the application starts-up normally. Here are other pieces of information which could be relevant:
Any hint or advice will be helpful 🙂
The text was updated successfully, but these errors were encountered: