我正在尝试分析由“mvn jetty:run”运行的应用程序,当我将 VisualVM 连接到它并单击配置文件 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 OnLoad Initialized succesfully
使用 mvn jetty:run 运行不同的应用程序时,我得到了同样的结果。
有趣的是,当我使用 NetBeans 的探查器(应该与 VisualVM 相同)时,它可以正常工作,但我更喜欢使用 VisualVM,有任何关于修复此问题的提示吗?
来自 jdk 1.6 的 VisualVM(但我之前也使用过可下载版本)。
VisualVM 的文档 https://visualvm.dev.java.net/gettingstarted.html?Java_VisualVM如果您使用 Java 6,则必须在启动 VM 时关闭类共享:
分析正在运行的应用程序
JDK 6,需要关闭类
否则共享应用程序
应用程序可能会崩溃。把关掉
班级共享,启动申请
使用 -Xshare:off 参数。
我怀疑 Maven 在启动 Jetty 时默认不使用此选项。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)