0

I'm currently trying to hunt down a/some memory leak in a java web/soap application and therefore I want to use VisualVM with plugin in IntelliJ.

I'm using as environment: Windows 10 1607 14393.2248 Java 1.8.0_121 VisualVM 1.4.1

At first after installation it was once working.

But now it stopped working - an error Message pops up:

Error: Local Java Applications Cannot Be Monitored  
Please see the VisualVM Troubleshooting Guide for more information and steps to fix the problem.  
https://visualvm.github.io/troubleshooting.html#jpswin2

There it says:

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 UserName but the jvmstat directory created by JDK is %TMP%\hsperfdata_username. To workaround the problem, exit all Java applications, delete the %TMP%\hsperfdata_username directory and create new %TMP%\hsperfdata_UserName directory.

My username is containing upper case letters, but the directory is as well upper case written (case sensitive) - so I don't see any problem. As there are no further logs I also dont know where to dig in next. Does anybody know how I get VisualVM working again?

PaulEdison
  • 897
  • 1
  • 15
  • 36
  • Were you able to locate %TMP%\hsperfdata_username directory? If so, quit all java applications and delele this directory. It will be re-created again, once you start any java application. – Tomas Hurka Jun 20 '18 at 08:46
  • @TomasHurka: Finally that worked ... little confusing, as it was first like that - but not working, CamelCase not working - delete and then working ... If it is an answer I would accept it. – PaulEdison Jun 23 '18 at 01:28

1 Answers1

5

Quit all java applications and delele %TMP%\hsperfdata_username directory. It will be re-created again, once you start any java application.

Nikolai Novik
  • 87
  • 2
  • 8
Tomas Hurka
  • 6,723
  • 29
  • 38