kamon-io / Kamon

Distributed Tracing, Metrics and Context Propagation for applications running on the JVM
https://kamon.io
Other
1.41k stars 328 forks source link

Kamon erroring with sbt-aspectj-weaver 0.11.0 #483

Closed juanjoDiaz closed 4 years ago

juanjoDiaz commented 7 years ago

I tried following the getting started guide but when running my app got:

[info] [INFO ] [2017-09-22T14:58:15,943] [main] [kamon.Kamon$Instance (LazyLogger.scala:35)] - Initializing Kamon...
[error] java.lang.RuntimeException: Crashed whilst crashing with this exception: java.lang.RuntimeException: Unknown constant type 18
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1718)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1641)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1406)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1159)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:527)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:363)
[error]     at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:121)
[error]     at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
[error]     at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
[error]     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
[error]     at java.lang.ClassLoader.defineClass1(Native Method)
[error]     at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[error]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[error]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[error]     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[error]     at java.security.AccessController.doPrivileged(Native Method)
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error]     at akka.event.Logging$Debug.<init>(Logging.scala:809)
[error]     at akka.event.LoggingBus.startStdoutLogger(Logging.scala:93)
[error]     at akka.event.LoggingBus.startStdoutLogger$(Logging.scala:91)
[error]     at akka.event.EventStream.startStdoutLogger(EventStream.scala:23)
[error]     at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:740)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:244)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:287)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:262)
[error]     at kamon.Kamon$Instance._start$lzycompute(Kamon.scala:61)
[error]     at kamon.Kamon$Instance._start(Kamon.scala:58)
[error]     at kamon.Kamon$Instance.start(Kamon.scala:69)
[error]     at kamon.Kamon$.start(Kamon.scala:37)
[error]     at RabbitMQIngester.AppRunner$.delayedEndpoint$RabbitMQIngester$AppRunner$1(AppRunner.scala:13)
[error]     at RabbitMQIngester.AppRunner$delayedInit$body.apply(AppRunner.scala:12)
[error]     at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error]     at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error]     at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error]     at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at scala.App.main(App.scala:76)
[error]     at scala.App.main$(App.scala:74)
[error]     at RabbitMQIngester.AppRunner$.main(AppRunner.scala:12)
[error]     at RabbitMQIngester.AppRunner.main(AppRunner.scala)
[error] Caused by: java.lang.RuntimeException: Unknown constant type 18
[error]     at org.aspectj.apache.bcel.classfile.ConstantPool.constantToString(ConstantPool.java:212)
[error]     at org.aspectj.weaver.bcel.LazyMethodGen$BodyPrinter.printInstruction(LazyMethodGen.java:782)
[error]     at org.aspectj.weaver.bcel.LazyMethodGen$BodyPrinter.print(LazyMethodGen.java:726)
[error]     at org.aspectj.weaver.bcel.LazyMethodGen$BodyPrinter.run(LazyMethodGen.java:652)
[error]     at org.aspectj.weaver.bcel.LazyMethodGen.print(LazyMethodGen.java:613)
[error]     at org.aspectj.weaver.bcel.LazyClassGen.printOne(LazyClassGen.java:860)
[error]     at org.aspectj.weaver.bcel.LazyClassGen.print(LazyClassGen.java:819)
[error]     at org.aspectj.weaver.bcel.LazyClassGen.toLongString(LazyClassGen.java:807)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1716)
[error]     ... 44 more
[error] [AppClassLoader@18b4aac2] abort trouble in: 
[error] akka.kamon.instrumentation.ActorLoggingInstrumentation -- (IllegalStateException) there is no classname for invokedynamic
[error] there is no classname for invokedynamic
[error] java.lang.IllegalStateException: there is no classname for invokedynamic
[error]     at org.aspectj.apache.bcel.generic.InvokeDynamic.getClassName(InvokeDynamic.java:126)
[error]     at org.aspectj.weaver.bcel.BcelAccessForInlineMunger.openAroundAdvice(BcelAccessForInlineMunger.java:141)
[error]     at org.aspectj.weaver.bcel.BcelAccessForInlineMunger.munge(BcelAccessForInlineMunger.java:80)
[error]     at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:440)
[error]     at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1697)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1641)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1406)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1159)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:527)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:363)
[error]     at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:121)
[error]     at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
[error]     at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
[error]     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
[error]     at java.lang.ClassLoader.defineClass1(Native Method)
[error]     at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[error]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[error]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[error]     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[error]     at java.security.AccessController.doPrivileged(Native Method)
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error]     at akka.event.Logging$Debug.<init>(Logging.scala:809)
[error]     at akka.event.LoggingBus.startStdoutLogger(Logging.scala:93)
[error]     at akka.event.LoggingBus.startStdoutLogger$(Logging.scala:91)
[error]     at akka.event.EventStream.startStdoutLogger(EventStream.scala:23)
[error]     at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:740)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:244)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:287)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:262)
[error]     at kamon.Kamon$Instance._start$lzycompute(Kamon.scala:61)
[error]     at kamon.Kamon$Instance._start(Kamon.scala:58)
[error]     at kamon.Kamon$Instance.start(Kamon.scala:69)
[error]     at kamon.Kamon$.start(Kamon.scala:37)
[error]     at RabbitMQIngester.AppRunner$.delayedEndpoint$RabbitMQIngester$AppRunner$1(AppRunner.scala:13)
[error]     at RabbitMQIngester.AppRunner$delayedInit$body.apply(AppRunner.scala:12)
[error]     at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error]     at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error]     at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error]     at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at scala.App.main(App.scala:76)
[error]     at scala.App.main$(App.scala:74)
[error]     at RabbitMQIngester.AppRunner$.main(AppRunner.scala:12)
[error]     at RabbitMQIngester.AppRunner.main(AppRunner.scala)
[error] Sep 22, 2017 2:58:16 PM org.aspectj.weaver.tools.Jdk14Trace error
[error] SEVERE: akka/kamon/instrumentation/ActorLoggingInstrumentation
[error] java.lang.IllegalStateException: there is no classname for invokedynamic
[error]     at org.aspectj.apache.bcel.generic.InvokeDynamic.getClassName(InvokeDynamic.java:126)
[error]     at org.aspectj.weaver.bcel.BcelAccessForInlineMunger.openAroundAdvice(BcelAccessForInlineMunger.java:141)
[error]     at org.aspectj.weaver.bcel.BcelAccessForInlineMunger.munge(BcelAccessForInlineMunger.java:80)
[error]     at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:440)
[error]     at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1697)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1641)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1406)
[error]     at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1159)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:527)
[error]     at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:363)
[error]     at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:121)
[error]     at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
[error]     at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
[error]     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
[error]     at java.lang.ClassLoader.defineClass1(Native Method)
[error]     at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[error]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[error]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[error]     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[error]     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[error]     at java.security.AccessController.doPrivileged(Native Method)
[error]     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error]     at akka.event.Logging$Debug.<init>(Logging.scala:809)
[error]     at akka.event.LoggingBus.startStdoutLogger(Logging.scala:93)
[error]     at akka.event.LoggingBus.startStdoutLogger$(Logging.scala:91)
[error]     at akka.event.EventStream.startStdoutLogger(EventStream.scala:23)
[error]     at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:740)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:244)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:287)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:262)
[error]     at kamon.Kamon$Instance._start$lzycompute(Kamon.scala:61)
[error]     at kamon.Kamon$Instance._start(Kamon.scala:58)
[error]     at kamon.Kamon$Instance.start(Kamon.scala:69)
[error]     at kamon.Kamon$.start(Kamon.scala:37)
[error]     at RabbitMQIngester.AppRunner$.delayedEndpoint$RabbitMQIngester$AppRunner$1(AppRunner.scala:13)
[error]     at RabbitMQIngester.AppRunner$delayedInit$body.apply(AppRunner.scala:12)
[error]     at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error]     at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error]     at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error]     at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at scala.App.main(App.scala:76)
[error]     at scala.App.main$(App.scala:74)
[error]     at RabbitMQIngester.AppRunner$.main(AppRunner.scala:12)
[error]     at RabbitMQIngester.AppRunner.main(AppRunner.scala)
[error] Sep 22, 2017 2:58:16 PM org.aspectj.weaver.tools.Jdk14Trace info
[error] INFO: Dumping to /Users/juanjodiaz/Documents/code/AGCO FUSE/code/rabbitmq-ingester/./ajcore.20170922.145816.380.txt
[error] Sep 22, 2017 2:58:16 PM org.aspectj.weaver.tools.Jdk14Trace info
[error] INFO: Dumping to /Users/juanjodiaz/Documents/code/AGCO FUSE/code/rabbitmq-ingester/./ajcore.20170922.145816.396.txt
[error] Exception in thread "main" java.lang.NoSuchMethodError: akka.kamon.instrumentation.ActorLoggingInstrumentation.aspectOf()Lakka/kamon/instrumentation/ActorLoggingInstrumentation;
[error]     at akka.event.Logging$Debug.<init>(Logging.scala:809)
[error]     at akka.event.LoggingBus.startStdoutLogger(Logging.scala:93)
[error]     at akka.event.LoggingBus.startStdoutLogger$(Logging.scala:91)
[error]     at akka.event.EventStream.startStdoutLogger(EventStream.scala:23)
[error]     at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:740)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:244)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:287)
[error]     at akka.actor.ActorSystem$.apply(ActorSystem.scala:262)
[error]     at kamon.Kamon$Instance._start$lzycompute(Kamon.scala:61)
[error]     at kamon.Kamon$Instance._start(Kamon.scala:58)
[error]     at kamon.Kamon$Instance.start(Kamon.scala:69)
[error]     at kamon.Kamon$.start(Kamon.scala:37)
[error]     at RabbitMQIngester.AppRunner$.delayedEndpoint$RabbitMQIngester$AppRunner$1(AppRunner.scala:13)
[error]     at RabbitMQIngester.AppRunner$delayedInit$body.apply(AppRunner.scala:12)
[error]     at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error]     at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error]     at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error]     at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at scala.App.main(App.scala:76)
[error]     at scala.App.main$(App.scala:74)
[error]     at RabbitMQIngester.AppRunner$.main(AppRunner.scala:12)
[error]     at RabbitMQIngester.AppRunner.main(AppRunner.scala)
[error] java.lang.RuntimeException: Nonzero exit code returned from runner: 1
[error]     at sbt.ForkRun.processExitCode$1(Run.scala:29)
[error]     at sbt.ForkRun.run(Run.scala:38)
[error]     at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1152)
[error]     at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1147)
[error]     at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:359)
[error]     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error]     at scala.util.Try$.apply(Try.scala:209)
[error]     at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:282)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error]     at java.lang.Thread.run(Thread.java:745)
[error] (compile:run) Nonzero exit code returned from runner: 1
jeroenwijdemans commented 6 years ago

I encountered this problem too.

Got rid of it by removing a dependency on aspectweaver "org.aspectj" % "aspectjweaver" % "1.8.9",`

ivantopo commented 4 years ago

I'm closing this issue because it is either too old to be relevant or stale. Stop by our Github Discussions section and drop a message if you need any additional help with the topic.

Have a nice day!