Friday, April 10, 2009

Quick and short post on jmxrmi exception in FUSE HQ.

If you even see following exception when using FUSE HQ or Hyperic HQ it is most likely an issue with what JDK/JRE you (or rather HQ) is using. The problem occurred while collecting statistics from FUSE ESB (Servicemix) and FUSE Message Broker (ActiveMQ).

Here is the exception:

org.hyperic.hq.product.PluginException: javax.naming.NameNotFoundException: jmxrmi
at org.hyperic.hq.product.jmx.MxServerDetector.discoverServices(
at org.hyperic.hq.product.ServerDetector.discoverResources(
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan_internal(
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan(
at org.hyperic.hq.autoinventory.ScanManager.mainRunLoop(
at org.hyperic.hq.autoinventory.ScanManager.access$000(
at org.hyperic.hq.autoinventory.ScanManager$
Caused by: javax.naming.NameNotFoundException: jmxrmi
at mx4j.remote.resolver.rmi.Resolver.lookupStubInJNDI(
at mx4j.remote.resolver.rmi.Resolver.lookupRMIServerStub(
at mx4j.remote.resolver.rmi.Resolver.lookupClient(
at org.hyperic.hq.product.jmx.MxUtil.getMBeanConnector(
at org.hyperic.hq.product.jmx.MxServerDetector.discoverServices(

The cause in my case:
FUSE HQ agent was using JRE 1.4 bundled with it which was causing the problem.
Why : There are some incompatibilities in JMX stuff when it comes to using the same code with JDK 1.4 and JDK 1.5 and apparently moving to JDK/JRE 1.5 got rid of this problem.
I don't know much about JMX so don't know what all incompatibilities are between tow of them. Anyone who reads (in first place) and knows the differences and could comment on this post it would help everyone.

No comments: