aspose file tools*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue about RMI