Hi folks, Just a quick question. I've been through most of the boards and didn't quite see the same problem I'm having and thought it must be something easy but subtle. I've developed the client and server using Windows XP and have gotten them to work on XP, 98, and 2000. However, when I try to run the set on a Solaris (or Linux) I get the Unmarshaled Exception, nested exception ClassNotFound on my server stub class. I am specifying the server's jar file as the codebase when starting up the registry and server, but the server on solaris always throws the above exception. I even unjarred my server jar file to ensure that the stub class was indeed there and indeed it was. In fact, if I pointed the codebase to the extracted jar file, then it seemed to find it ok. But it seems to have problems finding the stub class when packed into the server jar file. Anyone experience this; i.e. works fine on Windows, can't find the stub on Unix. Thanks RJ PS: command line rmiregistry -J-Djava.rmi.server.codebase=myServersJarFile.jar java -classpath myServerJarFile.jar -Djava.rmi.server.codebase=myServerJarFile.jar suncertify.server.Main
There's your key. This is about security above all. If you have a Security Manager in your code, then you need to include a policy file. the other thing that could be an issue, is going from Windows to Unix, hence the old forward or back slash issue. Check your code for back slashes as they have no meaning in UNIX. Hope that points you in a good direction. Mark
hi Mark: I can not test my assignment on Unix and according to your post, what i need to pay attention is that the forward and back slash in unix ans windows, is that right? Xiaoma Wang
Joined: Mar 04, 2002
hi, Mark: In the code to register remote server to rmiregistry, i used the following sentence: String name = "rmi://127.0.0.1:" + port + "/DataServer"; to rebind the name and the server. the forward slash "/" and "//" in the above expression are not changed in the unix ans windows? Hope get your reply! Xiaoma Wang
Joined: Feb 25, 2002
Originally posted by RJ Cox:
I get the Unmarshaled Exception, nested exception ClassNotFound on my server stub class.
I suggest not to set the codebase property at all on the server side and bundle the _Stub.class files with the client jar. [ April 23, 2002: Message edited by: Sai Prasad ]
String name = "rmi://127.0.0.1:" + port + "/DataServer"; to rebind the name and the server. the forward slash "/" and "//" in the above expression are not changed in the unix ans windows? Hope get your reply!
Yep, looks close to mine. Mark
Joined: Feb 01, 2002
SOLVED. When starting up the rmi registry I had inadvertantly fired it up within a command line that had happened to have a CLASSPATH already set. Just needed to zap the class path first, then start up the registry. Thanks all
Joined: Mar 27, 2002
Thank u! I was having the same problem and u solved it for! I love this site! Tkx!!! Rommel Carvalho