One my colleague was trying to monitor one of JBoss Server from Hyperic. While configuring the Hperic Agent he was getting the following exception:
The configuration has not been set for this resource due to : Invalid configuration: Error contacting resource: Can't connect to MBeanServer [java.naming.provider.url=jnp%3A//localhost%3A1099, java.naming.security.principal=,java.naming.security.credentials=]: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
Searched the forums and found that it is the problem related to JNDI. So what we tried was that we put jbossall-client.jar in the one of lib directory of Hyperic Agent and the problem solved.
References:




Sir, i have “javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial” while running my client
Please tell me steps to write the EJB 3.1 application ( procedure to write beans and client ) , Thanx in Advance..
I LOVE YOU Ranjan !!! Thanks a lot for this help…