• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI and Name Resolution for multiple drives  RSS feed

 
Michael Arnett
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
I have noticed that if I start an rmi server with a codebase that resides on a drive other than c, ( ie -Djava.rmi.server.codebase="file:///D:/test.jar") then the server will throw the following:
java.rmi.ServerException: Server RemoteException; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: tcs.ain.smsgw.RemoteQueue_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: tcs.ain.smsgw.RemoteQueue_Stub
java.lang.ClassNotFoundException: tcs.ain.smsgw.RemoteQueue_Stub
If I move the same jar file to c drive, change the codebase ( ie -Djava.rmi.server.codebase="file:///C:/test.jar")and voila, everything works like a charm. Am I missing something? Rmiregistry is started without any options.
Thanks in advance,
-MLA
 
James Cook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you ensured your RMIRegistry has been started with NO CLASSPATH?
The error suggests that the RMIRegistry is finding your stubs/skels on its classpath.
If it does, it *does not bother* sending the java.rmi.server.codebase System Property in the marshal stream...
I found that codebase can point to any drive, but that the java.security.policy must point to a file on the same disk as the Java SDK or JRE is installed on...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!