Skip to Main Content

Java APIs


For appeals, questions and feedback about Oracle Forums, please email Please ask technical questions in the appropriate category. Thank you!

RMI Tutorial Error

Fernando CostaSep 11 2013 — edited Sep 14 2013

I'm trying to complete the RMI tutorial [An Overview of RMI Applications], but it is not working properly. I want to register the remote object ( using an EC2 AIM virtual server instance and access it through a client ( running on my ultrabook. I've compiled the server code and started the RMI registry sucessfully, but when i try to register the remote object, i receive a ClasseNotFoundException exception:

[root@ip-172-31-19-0 tutorial]# java -cp /home/ec2-user/java/rmi/tutorial/src:/home/ec2-user/java/rmi/tutorial/lib/compute.jar



engine.ComputeEngine &

[4] 27190

[root@ip-172-31-19-0 tutorial]# ComputeEngine exception:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

        java.lang.ClassNotFoundException: compute.Compute

        at sun.rmi.server.UnicastServerRef.oldDispatch(

        at sun.rmi.server.UnicastServerRef.dispatch(

        at sun.rmi.transport.Transport$

        at sun.rmi.transport.Transport$

        at Method)

        at sun.rmi.transport.Transport.serviceCall(

        at sun.rmi.transport.tcp.TCPTransport.handleMessages(

        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(

        at sun.rmi.transport.tcp.TCPTransport$

        at java.util.concurrent.ThreadPoolExecutor.runWorker(

        at java.util.concurrent.ThreadPoolExecutor$


        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(

        at sun.rmi.transport.StreamRemoteCall.executeCall(

        at sun.rmi.server.UnicastRef.invoke(

        at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

        at engine.ComputeEngine.main(

I have found many discussions treating about this error, but no one helped me to fix it.

What am i doing wrong?

PS.: I have no variable CLASSPATH defined. Tomcat installation is fine  (directory listing enabled). Files are avaliable at "codebase" location as expected.

Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2013
Added on Sep 11 2013
1 comment