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

agentmain 方式测试错误?感觉是main #2

Open
koushui opened this issue Jun 26, 2019 · 0 comments
Open

agentmain 方式测试错误?感觉是main #2

koushui opened this issue Jun 26, 2019 · 0 comments

Comments

@koushui
Copy link

koushui commented Jun 26, 2019

依次运行 gradle runDemo2 和 gradle runAgentLoaderBuddy,运行gradle runAgentLoaderBuddy时报错:

Exception in thread "main" java.lang.IllegalStateException: Error during attachment using: net.bytebuddy.agent.ByteBuddyAgent$AttachmentProvider$Compound@4eec7777
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:384)
at net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:233)
at net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:208)
at com.demo.AgentLoader2.main(AgentLoader2.java:29)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.bytebuddy.agent.Attacher.install(Attacher.java:88)
at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:379)
... 3 more
Caused by: com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute
at sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:117)
... 9 more
Error opening zip file or JAR manifest missing: E:\Temp\javaagent-demo\proj-byte-buddy\target\libs\proj-byte-buddy.jar

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':proj-demo:runAgentLoaderBuddy'.

Process 'command 'C:\Program Files\Java\jdk1.8.0_211\bin\java.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
8 actionable tasks: 1 executed, 7 up-to-date

请问能否加你微信或者QQ请教(方便的话站内短信M我),我对ByteBuddy的文档不是很理解?谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant