0 Replies Latest reply on Apr 5, 2005 4:41 PM by mcobery

    RMIAdaptor and JBoss 4.0.1sp1

      HI,

      I am trying to access the the RMIAdaptor and keep running into the same problem. I am using the sample code with JBoss 4.0.1 sp1:

       Properties properties = new Properties();
       properties.put(Context.INITIAL_CONTEXT_FACTORY,
       "org.jnp.interfaces.NamingContextFactory");
       properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
       properties.put(Context.PROVIDER_URL, "localhost");
      
       InitialContext ctx = new InitialContext(properties);
       RMIAdaptor server = (RMIAdaptor)ctx.lookup("jmx/rmi/RMIAdaptor");
      


      I keep getting the following error in the ObjectInputStream in the readObject method (I have the jboss-allclient.jar in the classpath which contains the org/jboss/mx/util/Serialization class) :
      java.lang.NoClassDefFoundError: org/jboss/mx/util/Serialization
      at javax.management.ObjectName.(ObjectName.java:86)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:141)
      at $Proxy0.(Unknown Source)
      at sun.reflect.GeneratedSerializationConstructorAccessor24.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:788)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1631)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:51)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:566)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:993)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at JbossJmsAdmin.main(JbossJmsAdmin.java:64)

      Any ideas? Is this just a newbie common error. I am having the same problem hitting both a RedHat JBoss server and the local Windows XP server.

      Thanks for any help.

      MArc