java – VisualVM打破了jetty

我正在尝试分析由“mvn jetty:run”运行的应用程序,当我将VisualVM连接到它并单击Profile jetty崩溃时:

Profiler Agent: Waiting for connection on port 5140 (Protocol version: 8)
Profiler Agent: Established local connection with the tool
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6da5e5d4, pid=5124, tid=5704
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 )
# Problematic frame:
# V  [jvm.dll+0x1ae5d4]
#
# An error report file with more information is saved as:
# c:\dev\workspaces\credentials\credentialsgui\hs_err_pid5124.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Profiler Agent: JNI On Load Initializing...
Profiler Agent: JNI onl oad Initialized succesfully

我用不同的应用程序使用mvn jetty运行同样的事情:运行.

有趣的是,当我使用来自NetBeans的探查器(应该与VisualVM相同)时,它可以正常工作,但我更愿意使用VisualVM任何提示来修复它?

来自jdk 1.6的VisualVM(但我在可下载版本之前也使用过).

解决方法:

The documentation for VisualVM说如果你使用Java 6,你必须在启动VM时关闭类共享:

To profile an application running on
JDK 6, you need to turn off class
sharing for the application otherwise
the application may crash. To turn off
class sharing, start the application
with -Xshare:off argument.

我怀疑Maven在启动Jetty时默认不使用此选项.

上一篇:gulp自动化压缩合并、加版本号解决方案


下一篇:java – 正确编写servlet响应中的HTML页面