aspose file tools*
The moose likes Distributed Java and the fly likes RMI Problem. Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI Problem. Please help" Watch "RMI Problem. Please help" New topic
Author

RMI Problem. Please help

Ambrose R Tati
Greenhorn

Joined: Nov 06, 2000
Posts: 21
Dear all,
I've got a very basic RMI application. Everything compiles fine.
After starting the rmiregistry, I try to run the server program
I get a java.rmi.UnmarshalException
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: RemoteServer_Stub
My java programs:
1) ServerInterface.java (defines a single remote method)
2) RemoteServer.java (implements ServerInterface.java)
3) Client.java (calls remote method)
After compiling using javac and rmic I get the following classes:
1) ServerInterface.java
2) RemoteServer.class
3) RemoteServer_Stub.class
4) RemoteServer_Skel.class
5) Client.class
I'm doing all this on Win98/Jdk1.3
Can somebody help please?
Thanks
Ambrose Tati
chakri ch
Greenhorn

Joined: Mar 27, 2001
Posts: 9
Check ur classpath settings. Stub classes should be in the classpath.
-chakri
chakri ch
Greenhorn

Joined: Mar 27, 2001
Posts: 9
And of course stub class should be present in both the client and server side. That is it should be accesible to both client and server. So copy the stub class file and put that in the client folder too (if at all it is in different directory)
-chakri
Joe Murray
Greenhorn

Joined: Sep 19, 2001
Posts: 9
Originally posted by chakri ch:
And of course stub class should be present in both the client and server side. That is it should be accesible to both client and server. So copy the stub class file and put that in the client folder too (if at all it is in different directory)
-chakri

That is the same problem that I am having right now. I thought the RMI client was supposed to download the Stub when it attempts to access the server?


BSCS<br />SCJP, SCJD
chakri ch
Greenhorn

Joined: Mar 27, 2001
Posts: 9
It will not download the stub class on its own. U got to zip the stub class along with the client code.
-srinivas
Gregory Smith
Greenhorn

Joined: Sep 08, 2001
Posts: 13
The stub class could be downloaded to the client if you are using Code Mobility. For information on Code Mobility see chapter 9 of java.rmi by Esmond Pitt and Kathleen McNiff.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Problem. Please help
 
Similar Threads
IIOP protocol
How EJB works?
three questions about java RMI
help me to solve java.rmi.UnmarshalException
RMI (SCJD Exam) Problem