Java VisualVM破坏码头
我试图评测由“mvn jetty:run”运行的应用程序,当我将VisualVM连接到该应用程序并单击profile jetty崩溃时:Java VisualVM破坏码头,java,maven-2,jetty,visualvm,Java,Maven 2,Jetty,Visualvm,我试图评测由“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
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 OnLoad Initialized succesfully
使用mvn jetty运行不同的应用程序也会得到同样的结果:run
有趣的是,当我从NetBeans使用profiler(应该与VisualVM相同)时,它工作正常,但我更愿意使用VisualVM来修复这个问题
来自jdk 1.6的VisualVM(但我在可下载版本之前也使用过)。说,如果使用Java 6,启动VM时必须关闭类共享:
评测在上运行的应用程序的步骤
JDK 6,您需要关闭类
否则,请为应用程序共享
应用程序可能会崩溃。关掉
类共享,启动应用程序
with-Xshare:off参数
我怀疑Maven在启动Jetty时默认不使用此选项。链接似乎已断开。