无法将VisualVM分析器与Maven Jetty插件一起使用

rs_*_*atl 9 java profiling visualvm maven maven-jetty-plugin

我正在尝试分析使用mvn jetty:runVisualVM 1.3.6 执行的Java 7应用程序.CPU显示为不可用,配置文件选项卡列出以下错误:

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.
Run Code Online (Sandbox Code Playgroud)

我可以正常配置任何其他应用程序.

VisualVM日志多次显示以下错误:

java.io.IOException: Unable to open socket file: target process not responding or HotSpot VM not loaded
Run Code Online (Sandbox Code Playgroud)

可能相关的细节:
- OSX 10.8.3
- 在JDK 1.7u25下运行的app和VisualVM

我可以假设downvotes与这样一个事实有关,即有一个与此问题相关的文档错误以及设置的建议Xshare:off,我将包含此错误报告的链接,该报告在1.6u6之后将其列为已修复.我正在运行1.7u25,所以这不适用于我.

小智 14

对于Mac尝试传递这些VM args: -Xverify:none -Xshare:off

如果您正在使用JConsole,其他JMX Tools还包括:

-Xcom.sun.management.jmxremote

发现:http://brian.pontarelli.com/2009/10/21/fixing-java-tools-on-snow-leopard/