2009-11-18 28 views
4

我想要的輪廓,它通過應用程序運行「命令mvn碼頭:運行」,當我連接到的VisualVM它,點擊檔案碼頭崩潰:VisualVM的突破碼頭

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運行不同的應用程序:運行。

有趣的是,當我從NetBeans中使用Profiler(應該與VisualVM相同)時,它可以正常工作,但我更願意使用VisualVM提供有關解決此問題的任何提示?

來自jdk 1.6的VisualVM(但我也使用過可下載的版本)。

回答

6

The documentation for VisualVM說,如果你使用的是Java 6,您必須在啓動虛擬機關閉類共享:

要分析上 JDK 6上運行的應用程序,你需要關閉類 共享的應用程序可能會崩潰,否則 應用程序可能會崩潰。要關閉 班級共享,請使用-Xshare:off參數啓動應用程序 。

我懷疑Maven在啓動Jetty時默認不使用此選項。

+0

該鏈接似乎已損壞。 – Carcigenicate 2015-11-04 14:49:04