Is anyone downloading the server stub from the server machine. I am running into unmarshal exception and it is unable to find the stub classes. When I have the stubs on the client side, it runs fine. I am setting the java.rmi.server.codebase property, unless I am doing it the wrong way. Further it seems to be able to locate the policy file. Has any one run into similar problems. [This message has been edited by Narayan Veeramani (edited July 11, 2001).]
Narayan, Here are a few checkpoints to pinpoint possible sources of error: 1.) Ensure that the java.rmi.server.codebase property is set in the command line for the SERVER (not needed in the CLIENT). On a windows machine it must take the following form: -Djava.rmi.server.codebase=file:///c:/ahkhan/myapp/server.jar (note the tripple '/' after file ) In the example above i used executable jar files if you're using the raw files in directories then you SHOULDN'T just put the directory in which the file is located. Rather specify the directory off which it can be found using the full class specifier (e.g. if suncertify.server.RemoteServer is in directory c:/scdj/src/suncertify/server then specify c:/scdj/src as the codebase) 2.) Generatae stubs and ensure that the stub classes are in the same directory as the UnicastRemoteObject class when you run the server. 3.) Make sure the class files above are within the CLASSPATH of the server and not in the class path of the client.( You can save yourself a lot of problems with CLASSPATH's if you stick to using executable jar files) If the only error you're getting is what you've mentioned then these will correct that error. If you haven't properly defined the policy file then you'll probably get some new security exceptions. Hope this will help. Akanimo. [This message has been edited by Akanimo Udoh (edited July 12, 2001).]
posted 19 years ago
Thanks Akanimo and Doug for your feedback. I am planning on making these changes and see whether it works.
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
Devious Experiments for a Truly Passive Greenhouse!