-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
Description
At first, when I tried to run my .jar which uses the ea async dependency, I got the error that it couldn't find the class agend in my manifest. Therefore, I added
Agent-Class: com.ea.async.instrumentation.Agent
to my MANIFEST.MF and it seemed to fix this error, but now I got a new one and I really don't know what I am doing wrong.
It's a maven project so that's what I did:
- Added the dependency to my pom.xml
- Added the plugin to my pom.xml
- I rebuild the project, recreated the artifacts to apply possibly missing changes.
- I started using it with the import parameter
import static com.ea.async.Async.await;like on the examples.
It works fine if I start it in my IDE (Intellij / Javac 11), but does not if I put the compiled .jar (which contains the com.ea.async dir) on my debian 9 server and try to launch it there (it runs with open jdk 11).
I am grateful for any help! 🙏
This is my error (Servant is the name of my program):
Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
Caused by: java.lang.UnsupportedOperationException: adding retransformable transformers is not supported in this environment
at java.instrument/sun.instrument.InstrumentationImpl.addTransformer(InstrumentationImpl.java:94)
at com.ea.async.instrumentation.Agent.agentmain(Agent.java:52)
... 6 more
Agent failed to start!
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.ea.async.Async.init(Async.java:79)
at servant.Servant.main(Servant.java:79)
Caused by: java.lang.RuntimeException: Error attaching ea-async java agent
at com.ea.async.instrumentation.InitializeAsync.<clinit>(InitializeAsync.java:99)
... 2 more
Caused by: java.lang.RuntimeException: Error activating orbit-async agent from /home/bots/rin/Rin.jar
at com.ea.async.instrumentation.InitializeAsync.loadAgent(InitializeAsync.java:211)
at com.ea.async.instrumentation.InitializeAsync.<clinit>(InitializeAsync.java:80)
... 2 more
Caused by: java.lang.IllegalStateException: Could not self-attach to current VM using external process
at com.ea.async.shaded.net.bytebuddy.agent.ByteBuddyAgent.installExternal(ByteBuddyAgent.java:486)
at com.ea.async.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:420)
at com.ea.async.shaded.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:248)
at com.ea.async.shaded.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:223)
at com.ea.async.shaded.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:210)
at com.ea.async.instrumentation.InitializeAsync.loadAgent(InitializeAsync.java:205)
... 3 more
sampopes