[jboss-dev] What is needed on client classpath to use RMIAdaptor?

Kabir Khan kabir.khan at jboss.com
Mon Jun 14 09:49:43 EDT 2010


My jndi.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099

In my pom.xml I have added 

    <dependency>
	    <groupId>org.jboss.naming</groupId>
	    <artifactId>jnp-client</artifactId>
	    <version>5.0.5.Final</version>
       <scope>test</scope>
    </dependency>

And I get the error 

java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.management.MBeanServerConnection
	at org.jboss.test.JBossTestServices.getServer(JBossTestServices.java:154)
	at org.jboss.test.JBossTestServices.invoke(JBossTestServices.java:228)
	at org.jboss.test.JBossTestServices.deploy(JBossTestServices.java:286)
	at org.jboss.test.JBossTestCase.deploy(JBossTestCase.java:252)
	at org.jboss.test.deployers.as.test.ApplicationServerTestCase.testSimpleWebApp(ApplicationServerTestCase.java:76)

What exactly is needed?


More information about the jboss-development mailing list