0 Replies Latest reply on Sep 22, 2009 2:35 AM by Aleksey Malakhovskiy

    JBoss 5.1.0 & RMI

    Aleksey Malakhovskiy Newbie

      I have the following code in my webapp:

      try {
       Naming.rebind ( "//localhost:1099/myAppName", myClass );
      }
      catch ( Exception e ) { e.printStackTrace(); }
      


      and it works fine in JBoss 4.2.3.
      Now I install JBoss 5.1.0 and deploy the same mywebapp.war in it.
      And get the following exception:

       (ajp-localhost%2F127.0.0.1-8009-7) java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
       java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
       java.lang.ClassNotFoundException: my.domain.webapp.MyClass_Stub
      (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.Transport$1.run(Transport.java:159)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at java.security.AccessController.doPrivileged(Native Method)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at java.lang.Thread.run(Thread.java:619)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
      ERROR [STDERR] (ajp-localhost%2F127.0.0.1-8009-7) at java.rmi.Naming.rebind(Naming.java:160)
      ....
      


      But class my.domain.webapp.MyClass_Stub is present in mywebapp.war.
      What is the reason for this exception?