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 Developer Certification (SCJD/OCMJD) and the fly likes Issue about RMI 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 » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Issue about RMI" Watch "Issue about RMI" New topic
Author

Issue about RMI

Bin Wu
Ranch Hand

Joined: Jan 03, 2001
Posts: 32
When I test my rmi communication by putting all classes of client and server in one directory, the result is OK. But when I place the classes of client and server in different directory, some issue take place as follows.
Three kinds of problems in different environment:
1. set classpath=null->change to the directory where can't find any class->start rmiregistry->set classpath to the classes of server including the stub->change to another directory to start sererv->error: java.rmi.ServerException:RemoteException occured in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: FBNImpl_Stub.
2. set classpath to the classes of server including stub->start rmiregistry->start server(server running OK)->set classpath to the classes either in the client or in the server->run client->
Error: Can't find FBNImpl_Stub (in fact, FBNImpl_Stub was placed in the directory of client physically)
3. set classpath to the classes of server including stub->start rmiregistry->start server(server running OK)->set classpath only to the classes in the client->run client->Error: java.lang.NoClassDefFoundError: FBN ( FBN is the common interface either in the client and server, it was actually put in the directory of the client)
Who can tell me why? Thanks in advance.

Doug Melzer
Ranch Hand

Joined: Mar 23, 2000
Posts: 51
Look into java.rmi.server.codebase
 
Don't get me started about those stupid light bulbs.
 
subject: Issue about RMI
 
Similar Threads
Problem running server from jar file
dynamic code downloading problem with RMI
How to deploy classses in RMI
HELP: Muilt-Threaded Server
RMI registry service timeout