Today I started looking into creating a Spring and JMX enabled server type application. Seemed straight forward enough: create config files, create my MBeans, add the -Dcom.sun.management.jmxremote option to the Java process, start the server, connect JConsole. Easy peasy, or not as these things invariably are!
No matter what I tried, I could not get JConsole to connect to my java process. I knew I could connect to a remotely deployed, JMX enabled application, so I added the port setting, set authentication to false, but still no joy. I really didn’t want this to consume my day, so after much head scratching, I took the only sensible course of action open to me; I walked away from it!
After a couple of hours, I went back. I double checked everything: Windows Xp SP2, NTFS Filesystem, username does not have an ‘underscore’ (see JDK 5 Bug# 6332311 ), JDK version etc. Using the Jps tool, I listed all running java processes. The PIDs were being listed, followed by ‘Process information not available’. Okay so now to Google. After about 10 minutes searching I came across the solution to my problem on one of Sun’s Developer Forums.
The root cause of my issue was inherited DACLs (Discretionary Access Control Lists). Not something I would have suspected. So thanks to the guys who contributed to the thread on the Sun Forum for providing a solution to this problem.
Jay
Technorati Tags: Spring, JMX, JConsole, JDK 5 Bug# 6332311, Jps, Sun’s Developer Forums., DACLs