Hi,
I'm trying to run RMIRegistry using
servlet, after I start it, I'm trying to run another application from command line and trying to bind an object in the RMIRegistry.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I'm getting following exception on the application side:
java.rmi.ServerException: RemoteException occurred in server
thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:354)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at abc.xyz.bbb.register(Unknown Source)
at abc.xyz.bbb.main(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at abc.xyz.ccc.main(Unknown Source)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
On servlet side (where I'm running RMIRegistry)
I have java.rmi.server.logCalls & sun.rmi.server.exceptionTrace turned on and I'm getting:
sun.rmi.registry.RegistryImpl[0:0:0, 0]: void bind(java.lang.String, java.rmi.Remote)]
exception: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
java.lang.ClassNotFoundException
: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:132)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:143)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:319)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:187)
at sun.rmi.transport.Transport$1.run(Transport.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
at java.lang.Thread.run(Thread.java:484)
Exception dispatching call to [0:0:0, 0] in thread "RMI TCP Connection(3)-10.128.201.7" at Tue Jun 04 16:37:39 EDT 2002:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub(no security manager: RMI class loader disabled)
java.lang.ClassNotFoundException: abc.xyz.aaaImpl_Stub (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:132)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:143)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:319)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:187)
at sun.rmi.transport.Transport$1.run(Transport.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
at java.lang.Thread.run(Thread.java:484)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I have set up java.rmi.server.codebase property appropriately on the servlet side.
This set up works for me correctly If I set up the classpath of my
tomcat before starting tomcat. I don't think I need to setup classpath, java.rmi.server.codebase should work, but, somehow I'm missing something.
ANY help with this is greatly appriciated.
Thank you