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

metracer doesn't work under windows #49

Closed
kocherovms opened this Issue Apr 14, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@kocherovms
Copy link
Owner

kocherovms commented Apr 14, 2016

F:\downloads>java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.8.0_66\lib\tools.jar" -jar F:\downloads\metracer-1.3.5.jar -v 3096
Attached to JVM (PID 3096)
Management agent is running
Connected to MBean server
metracer agent is not loaded
Loading metracer agent from "/F:/downloads/metracer-1.3.5.jar"
Detached from JVM (PID 3096)
Failed to ensure metracer agent is running: Agent JAR not found or no Agent-Class attribute
java.lang.RuntimeException: Failed to ensure metracer agent is running: Agent JAR not found or no Agent-Class attribute
at com.develorium.metracer.Main.loadAgent(Main.java:195)
at com.develorium.metracer.Main.executeInstrument(Main.java:87)
at com.develorium.metracer.Main.executeCommands(Main.java:78)
at com.develorium.metracer.Main.execute(Main.java:62)
at com.develorium.metracer.Main.main(Main.java:38)
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)
at com.develorium.metracer.Main.ensureMetracerAgentIsRunning(Main.java:312)
at com.develorium.metracer.Main.loadAgent(Main.java:181)
... 4 more

@kocherovms kocherovms self-assigned this Apr 14, 2016

@kocherovms kocherovms added the bug label Apr 14, 2016

@kocherovms kocherovms added this to the 1.3.6 milestone Apr 14, 2016

@kocherovms

This comment has been minimized.

Copy link
Owner Author

kocherovms commented Apr 15, 2016

Under Windows it's required to use java.exe from under JDK - otherwise error is thrown:
java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.WindowsAttachProvider could not be instantiated
Failed to connect to JVM with PID 2660: no providers installed

That's because attach.dll is not found in JRE, so need to use java.exe from JDK which is closed to attach.dll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.