Maven / visualvm: how can I use visualvm to profile a running uptime process?

I can connect to the final process, but trying to profile it shows a selection:

CPU sampling:
Not available. Failed to create JMX connection to target application. Use 'Add JMX Connection' action to attach to the application.

Memory sampling:
Not available. Failed to read objects in target application. Check the logfile for details (use Help | About | Logfile).

And trying to start profiling shows an empty error message field

+5
source share
1 answer

As the saying goes: “Could not create JMX connection”, how about enabling jmx when starting maven? Here is the question of how to activate jmx , and I think you can use MAVEN_OPTS or JAVA_OPTS to provide these maven options.

+1
source

All Articles