VMware Cloud Community
TheChristoph
Contributor
Contributor

Problem while getting JBoss4.2

Hello!

I tried to add a JBoss4.2 to my Hyperic (Version 3.2.4) and I allways gat the following error, I don't know how to solve it. Can anybody please give me some help.

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]

Stacktrace:

2008-12-12 12:37:43,249 ERROR [RuntimeAutodiscoverer] Unexpected error running autodiscoverer for plugin: JBoss 4.2: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
org.hyperic.hq.product.PluginException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
at org.hyperic.hq.plugin.jboss.JBossDetector.discoverJBossServices(JBossDetector.java:604)
at org.hyperic.hq.plugin.jboss.JBossDetector.discoverServices(JBossDetector.java:589)
at org.hyperic.hq.product.ServerDetector.discoverResources(ServerDetector.java:203)
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan_internal(RuntimeAutodiscoverer.java:272)
at org.hyperic.hq.autoinventory.agent.server.RuntimeAutodiscoverer.doRuntimeScan(RuntimeAutodiscoverer.java:205)
at org.hyperic.hq.autoinventory.ScanManager.mainRunLoop(ScanManager.java:165)
at org.hyperic.hq.autoinventory.ScanManager.access$000(ScanManager.java:41)
at org.hyperic.hq.autoinventory.ScanManager$1.run(ScanManager.java:107)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.hyperic.hq.plugin.jboss.JBossUtil.getMBeanServer(JBossUtil.java:138)
at org.hyperic.hq.plugin.jboss.JBossDetector.discoverJBossServices(JBossDetector.java:602)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 12 more
Reply
0 Kudos
6 Replies
TheChristoph
Contributor
Contributor

problem solved... 😞

On some the servers the jboss-path allows backslashes on others not.
Reply
0 Kudos
Dans_hyperic
Enthusiast
Enthusiast

Please.

Could you say how to fix the problem?
What changes did you make?

Thnx

Dans
Reply
0 Kudos
TheChristoph
Contributor
Contributor

The problem was that my Hyperic-Agent couln't catch the JBoss-Server because I used backslashes instead of ordinary slashes.

jboss.installpath=e:\jboss-4.2.1.GA -> NOT OK
jboss.installpath=e:/jboss-4.2.1.GA -> OK

If you have the same error, the path to your JBoss may also not correct.
Reply
0 Kudos
santhoshsd
Contributor
Contributor

I am getting the same error ...
tried both forward slash and backward slash

I get the following error

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]
Reply
0 Kudos
shippu4u
Contributor
Contributor

where to check this slashes
Reply
0 Kudos
ranjankumar
Contributor
Contributor

I faced the same problem.

I put jbossall-client.jar from JBoss in the classpath of Hyperic Agent i.e. (in the relevant lib of Hyperice Agent).

And the problem solved. 🙂
Reply
0 Kudos