VisualVM Troubleshooting Guide
This document describes the most common problems related to using VisualVM and information on how to fix or workaround the problems. If you are experiencing any problem not described in this document, please ask for assistance on a mailing list or file a bug report (you need to be registered to access the mailing list or file a bug report).
Problems With Starting VisualVM
VisualVM Does Not Start
Description: VisualVM doesn't start at all without any visible reason.
Resolution: There are several reasons which could prevent VisualVM from starting:
- The download is broken - make sure you've got the correct bits (archive managers typically notify you when the archive is broken)
- VisualVM waits for license confirmation - make sure you haven't overlooked the License Agreement dialog
- Incorrect JDK is used for running VisualVM - if you haven't defined a JDK to run VisualVM manually, make sure that the default Java on your system is Oracle/Sun JDK 7+ (or JDK 6+ for VisualVM 1.3.6 and previous versions)
- Incorrectly set JDK for running VisualVM - if you have defined a JDK to run VisualVM manually, make sure the path to the JDK is correct and doesn't end with a slash
- Incorrectly set VisualVM user directory - if you have defined VisualVM user directory manually, make sure it is outside of VisualVM installation directory
VisualVM has stopped working (Native Error Dialog During Startup)
Description: 'VisualVM has stopped working' dialog is shown during VisualVM startup by the operating system, VisualVM process terminates.
Resolution: This problem occurs on Windows systems when the VisualVM process is started in Compatibility mode for Windows 95/98/ME. Please make sure the Compatibility mode is disabled for VisualVM launcher, or use Compatibility mode for the newest possible OS version if required. Note: using the Compatibility mode for running VisualVM or the monitored Java applications is strongly not recommended, virtualized environments incompatibilities may crash the Java processes.
Java(TM) Platform SE binary has stopped working (Native Error Dialog During Startup)
Description: 'Java(TM) Platform SE binary has stopped working' dialog is shown during VisualVM startup by the operating system, VisualVM process terminates.
Resolution: This is a known JDK bug in the d3d rendering pipeline affecting Windows 64bit systems. To disable d3d acceleration
visualvm.exe -J-Dsun.java2d.d3d=false to start VisualVM. Alternatively you may update the
file to include the
-J-Dsun.java2d.d3d=false switch in the
default_options section. See the JDK bug #6772139
for more details.
Error Starting VisualVM (Error Dialog During Startup)
Description: 'Error Starting VisualVM' dialog is shown during VisualVM startup with a message about an unsupported version of Java.
Resolution: VisualVM runs only on JDK 7+ (or JDK 6+ for VisualVM 1.3.6 and previous versions) - not the JRE! When started on JRE or incorrect JDK version, VisualVM shows this dialog and terminates. To define which JDK will be used for running VisualVM, follow the steps in the Starting VisualVM section of the Getting Started with VisualVM document.
Warning - could not install some modules (Error Dialog During Startup)
Description: 'Warning - could not install some modules' dialog is shown during VisualVM startup showing a list of affected modules.
Resolution: This typically happens if you unzip new VisualVM version over an already existing VisualVM installation. Make sure you are unzipping the VisualVM to a new directory.
Problems With Using VisualVM
No Running Applications Detected, Exception Thrown After Startup
Description: No running applications are shown in Applications tree, an exception is thrown after VisualVM startup (
java.lang.NullPointerException at JvmJvmstatModelProvider.createModelFor(JvmJvmstatModelProvider)).
Resolution: This happens for VisualVM 1.1 and previous releases and for Java VisualVM 6u11 and previous releases when there's at least one Java application running on JDK 6 Update 12 on the system (incl. the VisualVM itself). To fix this problem, download and install the latest VisualVM-Extensions plugin from the Plugin Center using Tools -> Plugins. Details can be found in this blog post.
Local Applications Cannot Be Detected (Error Dialog On Startup)
Description: An error dialog saying that local applications cannot be detected is shown immediately after VisualVM startup.
Resolution: This can happen on Windows systems, it's caused by misconfigured
jvmstat technology used to detect
the running applications. There are two possible causes:
- Insufficient permissions for
%TMP%\hsperfdata_usernamefolder - make sure you're able to create a file in the directory and eventually update the permissions for full folder access. Alternatively you can just re-create the folder which should automatically set the correct access rights. See see this forums.sun.com thread for more details.
%TMP%\hsperfdata_usernamefolder on a FAT disk - by default
jvmstatdoesn't work on FAT disks due to security restrictions. You can bypass the security check by setting the
-XX:+PerfBypassFileSystemCheckflag for both VisualVM and the monitored application. See the JDK bug #5042659 for more details.
Local Applications Cannot Be Monitored (Error Dialog On Startup)
Description: An error dialog saying that local applications cannot be monitored is shown immediately after VisualVM startup. Locally running Java applications are displayed as <Unknown Application> (pid ###).
Resolution: This can happen on Windows systems if the username contains capitalized letters. In this case, username is
the jvmstat directory created by JDK is
%TMP%\hsperfdata_username. To workaround the problem, exit all Java applications, delete the
directory and create new
No Running Remote Applications Detected
Description: There are no running applications shown for remote host in the Applications window on the left side.
Resolution: Make sure that the
jstatd utility is running on the remote host you want to monitor.
This is a requirement for VisualVM to be able to discover and access remote Java applications. More information about
jstatd can be found
in the Working with Remote Applications document.
Known limitation: In this VisualVM release the
be used when starting the
jstatd utility, i.e. the use of the
-n options is not supported.
Cannot Add Or Edit Hosts On Linux
Description: Adding a remote host and/or invoking Properties on an existing host throws
java.lang.NullPointerException on Linux/Solaris, new host cannot be added.
Resolution: This happens when running the VisualVM 1.2 or newer on JDK 7 or OpenJDK 6 with GTK LaF. It is caused by a JDK bug introduced in JDK 7 b10. Details are available in
VisualVM bug #372. A quick workaround is to change the look'n'feel using
visualvm --laf Nimbus or
visualvm --laf Metal or use Oracle JDK 7 to run VisualVM.
HeapWalker Throws Exceptions When Switching Views
Description: Switching views (Overview/Classes/Instances/OQL Console) in the HeapWalker throws
java.lang.IncompatibleClassChangeError, UI is not repainted.
Resolution: This happens when running the VisualVM on JDK 6 Update 17 and newer using the Windows LaF. Details and hotfix are available in
VisualVM bug #333. A quick workaround is to change the look'n'feel using
visualvm.exe --laf Nimbus or
visualvm.exe --laf Metal or use JDK 6 Update 16 (or previous) to run VisualVM.
Profiler Tab Shows Warning About Class Sharing, Profiling Does Not Work
Description: "Class sharing is enabled for this JVM" warning is shown in red box in Profiler tab, profiling CPU or Memory crashes local applications running on JDK 6 Update 6 and earlier.
Resolution: There is a known problem with dynamic attach which is used for profiling, it may
cause target JVM to crash when class sharing is enabled. To start an application without class sharing, provide
java command starting the application. More information can be found in JDK bug #6497639
and JDK bug #6598065.
CPU Profiling Fails With "Redefinition failed with error 62"
Description: CPU profiling in the Profiler tab or using the Startup Profiler plugin fails, VisualVM displays message "Redefinition failed with error 62".
Resolution: Restart the application with the VM argument -Xverify:none to disable classfile verification. You must restart the application to disable classfile verification. You cannot disable verification if the application is running.
Profiler Measures Incorrect Performance Results
Description: Performance profiling results are incorrect - zero or negative times etc.
Resolution: During first VisualVM startup calibration is performed to measure profiling overhead on local system. The calibration
data are then used to measure accurate profiling results. When the system performance changes, calibration data are no more valid and profiling results become biased.
To recalibrate the profiler, you have to manually delete the calibration data file
and restart VisualVM - calibration will be performed again on VisualVM startup.
Problems With VisualVM Plugins
Cannot Download VisualVM Plugins
Description: The Available Plugins tab of the Plugins dialog is disabled, no plugins can be downloaded.
Resolution: This problem occurs when VisualVM is unable to connect to the online Plugins Center. There are several reasons which could prevent VisualVM from accessing the Plugins Center: broken internet connection, incorrect proxy setup, proxy blocking the required port, missing certificate for dev.java.net etc. Make sure your internet connection is up and you can access the Plugins Center descriptor file at the address defined in the Settings tab of the Plugins dialog. If the connection still cannot be established, you can download the plugins using a different machine and install them manually, see the Plugins Centers page for details.
Timeout While Installing a Plugin
Description: Plugin Installer dialog shows 'The Plugin Installer found problem timeout of loading <module name>' message.
Resolution: This can sometimes happen when installing a plugin from the Plugins Center. The plugin could not be enabled in the actual VisualVM session, please restart the VisualVM to start using the plugin.
Validation Warning While Installing a Plugin
Description: Validation Warning dialog with Validation failed message is shown when installing a plugin from VisualVM Plugin Center.
Resolution: This occurs when installing any plugin from VisualVM Plugin Center. In fact the plugins are valid and trusted, you can simply skip the dialog and continue with plugin installation. The problem is caused by a missing key in VisualVM tool to recognize plugin certificate validity.
Cannot Get The List Of Web Applications From GlassFish
Description: Opening the "Model" subnode of the GlassFish application hangs with "Please Wait" displayed
Resolution: This happens when monitoring of web applications is not allowed on the target server. In order to enable monitoring you need to go to Application Server/Monitor/Runtime/Configure Monitoring from the GlassFish administration console and set Web Container to High. You can also try and use this link to open the configuration from here.
No Servlets Displayed In The Runtime Area Of GlassFish Web Application Tab
Description: There are no servlets displayed in the runtime are of GlassFish web application tab (see here)
Resolution: Only servlets with some statistics available are displayed. In order to generate statistics put some load on the web application.