English 中文(简体)
VisualVM breaks jetty
原标题:

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:devworkspacescredentialscredentialsguihs_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

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

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?

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

问题回答

The documentation for VisualVM says that if you are using Java 6 you must turn off class sharing when you start the 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.

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





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签