I can attach to the surefire process, but trying to profile it shows for sampling:
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 box
The Profiler tab of an application enables you to start and stop the profiling session of a local application. Profiling results are displayed in the Profiler tab. You can use the toolbar to refresh the profiling results, invoke garbage collection and save the profiling data.
Under the Local node in the Applications window, right-click the application node and choose Open to open the application tab. Click the Profiler tab in the application tab. Click Memory or CPU in the Profiler tab. When you choose a profiling task, VisualVM displays the profiling data in the Profiler tab.
VisualVM takes application monitoring one level deeper than JConsole by allowing the user to analyze thread execution as well as the ability to profile CPU and memory usage of JVM requests, both of which are triggered manually by the user.
On a Windows system, start VisualVM by double-clicking jvisualvm.exe. You can also select VisualVM from the Start menu (if Windchill shortcuts are installed). On other systems, start VisualVM by invoking the jvisualvm script.
As it says "failed to create JMX connection" what about enabling jmx when starting maven? Here is a question how to activate jmx and i think you can use MAVEN_OPTS or JAVA_OPTS to provide those parameters to maven.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With