This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes RMI between 2 JVMs in different physical machines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI between 2 JVMs in different physical machines" Watch "RMI between 2 JVMs in different physical machines" New topic
Author

RMI between 2 JVMs in different physical machines

Preethi Ramesh
Greenhorn

Joined: Sep 10, 2011
Posts: 1
I'm trying to implement RMI communication between 2 JVMs on diff physical machines from the calculator example here. I've tried it on the same physical machine and it worked fine.

On diff machines(changing the client's side program by substituting host ip instead of localhost), the client's side comes up with this error showing this error:

RemoteException
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: CalculatorImpl_Stub


I've also implemented this while running the client's side program. Can someone please help me out? I've been lost for a week.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: CalculatorImpl_Stub


Well - thats pretty clear. It looks like you do not have CalculatorImpl_Stub in a package. Therefore the JVM looks only in the "current directory" for the class file. You need to have all classes involved in this experiment in a package.

Probably it only works on a single machine because of where you start it.

Bill

 
 
subject: RMI between 2 JVMs in different physical machines
 
Similar Threads
Vertical vs. horizontal schemas
Server-side threads in Java RMI
Authorisatio & autiontication
Can anyone explain what is == and equal( ) ?
CORBA