VisualVM's Memory Sampler is inactive for Axon.ivy Engine running as WIndows Service
We have an Axon.ivy Engine running as a Window Service. The version of the Axon.ivy we are using is 5.1.4.48243. We intentionally installed JDK 1.7.0_60 in order to use the VisualVM to monitor and investigate some memory issue. The Axon.ivy Engine is configured with JMX port.
We are able to view the Axon.ivy Enigne application in the VisualVM but the Memory Sampler is rendered inactive and the notification given to us is:
```
Memory sampling:
Not available. Cannot connect to target application. Make sure the application is running on a supported JDK 6 or JDK 7.
```
If we run the Axon.ivy Engine as a non-service, everything works.
We looked into the Axon.ivy Engine and discovered that it included a JRE inside which was also 1.7.0_60. We tried to configure the argument `ivy.dir.jre` to the JDK's `jre` but it still didn't work.
We also discovered that the file `jre/bin/server/jvm.dll` in the JDK and the Axon.ivy Engine's JRE were different (using SHA-1 checksume) despite everything looks the same on the surface.
The questions are:
- Is it possible to use Memory Sampler on VisualVM to the Axon.ivy Engine running as a Windows Service? How?
- Why we cannot start the Axon.ivy Engine when we change the argument `ivy.dir.jre`?
Thanks
**UPDATE**
I managed to find a way to start both Axon.ivy Engine service and VisualVM both under Local System account using [PSTools][1]. However, the result is still the same, the Memory Sampler is still inactive.
![VisualVM and Axon.ivy Engine service are both started under Local System account][2]
![Axon.ivy Engine JVM details][3]
![VisualVM JVM details][4]
[1]: http://stackoverflow.com/questions/77528/how-do-you-run-cmd-exe-under-the-local-system-account
[2]: http://s27.postimg.org/byxe5nb0j/visual_vm_and_axonivy_service_both_started_as_sy.png
[3]: http://s27.postimg.org/8qswsloqr/axon_ivy_engine_jvm_details.png
[4]: http://s27.postimg.org/o22pt7m2r/visual_vm_jvm_details.png