VisualVM breaks the marina

I am trying to profile an application that starts "mvn jetty: run" when I connect VisualVM to it and click on "Profile pier" 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 

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

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

VisualVM from jdk 1.6 (but I used it before the download version).

+4
source share
1 answer

The documentation for VisualVM says that if you are using Java 6, you should disable class sharing when starting the virtual machine:

To profile an application running JDK 6, you need to disable the application sharing class otherwise the application may crash. Disable class sharing, launch the application with the -Xshare: off argument.

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

+6
source

Source: https://habr.com/ru/post/1235211/


All Articles