• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI between 2 JVMs in different physical machines

 
Preethi Ramesh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic