aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 12675
    
    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


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI between 2 JVMs in different physical machines
 
Similar Threads
CORBA
Vertical vs. horizontal schemas
Can anyone explain what is == and equal( ) ?
Server-side threads in Java RMI
Authorisatio & autiontication