Why isn't VisualVM showing all the normal tabs?
Asked Answered
P

8

37

Usually I see all these tabs in VisualVM for locally running Java programs:

enter image description here

However, I have one local program which is currently only showing me Overview and Monitor (even though it usually shows all those shown above):

enter image description here

Also interesting is that VisualVM itself doesn't present the Profile tab:

enter image description here

All three of the programs shown are running with the same JVM with the same Java Home.

What controls which tabs are shown for a particular program? How can I get them all back for my program showing just Overview and Monitor?

I have Visual VM 1.3.5 (latest at this date) and JDK 1.7.0_17.

Puca answered 15/4, 2013 at 19:42 Comment(1)
There is a particular https:// connection this program makes to an external site. When I turn this functionality off (so no requests are made), then I get all my tabs in VisualVM. Hmm....Puca
N
25

I found that this was the issue of usage of wrong JDK version. In my case my application was running on 64bit JDK and I started VisualVM from 32bit JDK. After starting VisualVM from the same JDK on which my application is running, everything was fine. Hope it will help you.

Nad answered 4/9, 2013 at 16:42 Comment(2)
Were you able to do it for a remote application as well (my profile tab is not showing up for remote app, only local) ? thanksCharlton
@DiegoRamos VisualVM doesn't support profiling of remote applications: docs.oracle.com/javase/8/docs/technotes/guides/visualvm/…Nad
N
13

You might need to enable jmx ports on your app. Try adding these switches to your VM and see if the tabs appear again:

-Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

Nautilus answered 15/4, 2013 at 19:47 Comment(3)
these are all local programs -- does this still apply?Puca
I once wanted to profile my local jboss and in that case yes it did make a difference. I don't remember if I had to add the jmx port to VisualVM or it found it itself.Nautilus
I've tried all the suggested answers (verified that jvisualvm uses the same java version as application, deleted ~/.visualvm folder, no proxy) but only this one worked, even though jvisualvm and app were running on the same machine.Spangle
C
5

I've just removed ~/.visualvm and reran, See https://java.net/jira/browse/VISUALVM-598

Cytochemistry answered 9/7, 2014 at 13:26 Comment(0)
B
3

As most of the people mentioned, The issue was due to the version mismatch of virtualvm and your application.

additionally, visualvm is bundled in oracle which supports jdk up to 9. If you are using >9, please make sure you go for another profiler.

Backdrop answered 21/7, 2020 at 11:25 Comment(0)
O
1

What worked for me was specifying the "Start profiling from" classes. If I left this blank, I didn't get the profiler tab. When I specified it, I did. I should probably note that this was a web application running under Tomcat, so I specified org.apache.catalina.startup.** as the starting class.

Oleg answered 15/4, 2016 at 11:48 Comment(0)
G
0

Check that proxy is disabled if you are running VisualVM for local application

Gawk answered 16/3, 2017 at 0:31 Comment(0)
H
0

I had a similar problem with missing profiler tab in VisualVM. I'm using Oracle JDK 1.8 and want to profile web application running on Tomcat 8 (JPA, Spring, Hibernate, Vaadin, etc).

I tried all above-mentioned solutions and many others found on the internet, but unfortunately, none of them solved missing profiler tab issue.

So I switched to Java Mission Control profiling tool (JMC + Flight Recorder) which is a part of standard Oracle JDK (from JDK 1.7 update 40) and it works great.

Halden answered 11/1, 2018 at 8:50 Comment(0)
F
0

In my case, the issue was the usage of wrong JDK version. My App was running on jdk1.7.0_80, VisualVm running with jdk1.8.0_162. Replacing the APP JDK version from 1.7.0_79 to 1.7.0_80 fixes the problem.

Firecrest answered 15/5, 2018 at 13:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.