Connecting VisualVM to Oracle JVM
534035Oct 6 2011 — edited Oct 18 2011Has anyone had any success connection to the database JVM using Visual VM.
I've started the jmx agent using dbms_java.start_jmx_agent, and am able to connect with jconsole without problems, but when I try to connect with VisualVM, I get an error message java.lang.NumberFormatException: For input string: "(PID=5044;SID=248)"
I've taken a look at the VisualVM code and the problem appears to be that when VisualVM reads the virtual machine name, it gets something like (PID=X;SID=Y)@SERVERNAME. Visual VM then takes everything before the @ in that name string and attempts to convert it to an integer.
Versions:
Oracle Database 11gR2 running on Windows.
Oracle VisualVM 1.3.2
For background, I'm trying to profile a Java procedure which is running much slower inside the DB than outside of it.
A quick fix might be to 'rename' the java virtual machine for the database session in question, but I can't find a way to do that? Any ideas?
Many thanks,
James