I'm attempting to profile a Java 7 application executed using mvn jetty:run
with VisualVM 1.3.6. The CPU shows as unavailable, and the profile tab lists the following error:
WARNING! Class sharing is enabled for this JVM. This can cause problems when profiling the application and eventually may crash it. Please see the VisualVM Troubleshooting Guide for more information and steps to fix the problem: https://visualvm.java.net/troubleshooting.html#xshare.
I am able to profile any other application normally.
The VisualVM log shows the following error a number of times:
java.io.IOException: Unable to open socket file: target process not responding or HotSpot VM not loaded
Potentially relevant details:
- OSX 10.8.3
- Both app and VisualVM running under JDK 1.7u25
I can presume the downvotes are related to the fact that there is a documented bug related to this issue with advice to set Xshare:off
, I'll include this link to the bug report, which lists it as fixed after 1.6u6. I am running 1.7u25, so this does not apply to me.