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

getting exception when starting in agent mode #650

Closed
ohpoloha opened this issue Jun 8, 2023 · 1 comment
Closed

getting exception when starting in agent mode #650

ohpoloha opened this issue Jun 8, 2023 · 1 comment

Comments

@ohpoloha
Copy link

ohpoloha commented Jun 8, 2023

sorry, I'm new to this tool. I was trying to start in agent mode as attach did not work for me. However, got the exception below when starting in agent mode. How can I fix this? Thanks!

$ java -javaagent:target/recaf-2.21.13-J8-jar-with-dependencies.jar -jar target/recaf-2.21.13-J8-jar-with-dependencies.jar
00:27:45.926 [main] INFO : Recaf-2.21.13
00:27:45.929 [main] INFO : - Java: 18.0.2.1 (Java HotSpot(TM) 64-Bit Server VM)
00:27:45.931 [main] INFO : Starting as agent...
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
        at java.base/java.lang.reflect.Method.invoke(Method.java:577)
        at me.coley.recaf.Agent.agent(Agent.java:51)
        at me.coley.recaf.Agent.premain(Agent.java:27)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        ... 3 more
Caused by: java.lang.NoClassDefFoundError: javafx/concurrent/Task
        at me.coley.recaf.command.impl.Initializer.run(Initializer.java:60)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at me.coley.recaf.Recaf.launch(Recaf.java:103)
        at me.coley.recaf.Recaf.agent(Recaf.java:73)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        ... 7 more
Caused by: java.lang.ClassNotFoundException: javafx.concurrent.Task
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 19 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at s\open\src\java.instrument\share\native\libinstrument\JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
@Col-E
Copy link
Owner

Col-E commented May 19, 2024

Closing as 4.X is the only branch we're working on going forward. It has a much more lightweight agent attach mechanism.

@Col-E Col-E closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants