• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue about RMI

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into java.rmi.server.codebase
 
reply
    Bookmark Topic Watch Topic
  • New Topic