Reputation: 154
I am trying to set up Kamon on my Spray / Akka service but I am not getting very far unfortunately.
I use the sbt-assembly plugin to build a single jar file which I run with a simple java -jar service.jar.
I naively thought that I would be able to weave the service with java -javaagent:aspectj-1.8.8.jar -jar service.jar but I get :
objc[13280]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. Failed to find Premain-Class manifest attribute in aspectj-1.8.8.jar Error occurred during initialization of VM agent library failed to init: instrument
And of course, my service doesn't start. (it works just fine without aspectj. I also tried aspectj 1.7.4 and the paths are correct.
Any help / pointer would be very appreciated !
Upvotes: 0
Views: 198
Reputation: 154
The solution was because I was starting the JVM with AspectJ and not AspectJWeaver... All good now !
Upvotes: 1