VisualVM打破码头 [英] VisualVM breaks jetty

查看:109
本文介绍了VisualVM打破码头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to profile application that is run by "mvn jetty:run", when I connect VisualVM to it and click on Profile jetty crashes with:

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在不同的应用程序上获得的相同的东西.

The same thing I get with different application run using mvn jetty:run.

有趣的是,当我使用NetBeans的探查器(应该与VisualVM相同)时,它可以正常工作,但是我更喜欢使用VisualVM来解决此问题的任何提示?

What's funny is that when I used profiler from NetBeans (should be the same as VisualVM) it works correctly, but I would prefer to use VisualVM any hints on fixing this?

jdk 1.6中的VisualVM(但我也使用可下载版本之前的版本).

VisualVM from jdk 1.6 (but I used also before a downloadable version).

推荐答案

VisualVM的文档表示,如果您使用的是Java 6,则必须在启动VM时关闭类共享:

The documentation for VisualVM says that if you are using Java 6 you must turn off class sharing when you start the VM:

要分析运行于其上的应用程序 JDK 6,您需要关闭课程 否则共享应用程序 该应用程序可能会崩溃.把关掉 类共享,启动应用程序 -Xshare:off参数.

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时默认不使用此选项.

I suspect that Maven does not use this option by default when it starts Jetty.

这篇关于VisualVM打破码头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆