2 Replies Latest reply on Nov 5, 2003 11:15 AM by cfoulkes

    Error going from Jboss 2.4.4 to 3.2.2

    cfoulkes Newbie

      Hi,

      I have a simple test application (a client calling a stateful session ejb).

      The code worked when deployed in Jboss 2.4.4, but when I run it under JBoss 3.2.2 it fails with the following exception:

      javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:462)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at Client.StatefulStatefulSimple1Client.main(StatefulStatefulSimple1Client.java:37)
      Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
      ... 3 more
      Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair (no security manager: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
      at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
      at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
      at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
      Exception null
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
      ... 5 more



      The error occurs when processing the following code:



      public static void main(String[] args) {
      Hashtable env = new Hashtable();

      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "localhost:1099");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      try{
      Context ctx = new InitialContext(env);
      Object obj = ctx.lookup("StatefulSimple1");

      it fails on the lookup.


      If you can help explain what is going wrong I'd appreciate it.

      Thanks

      Colin