I met problems related to RMI. I have prepared 2 jars, client.jar and server.jar which are the classes required to start client and server respectively. Is that _Skel.class should only be included in client.jar while _Stub.class should only be included in server.jar? However, I found that I cannot run the client without _Stub.class in the client.jar. I have tried to start a HTTP server and set the codebase to the HTTP directory containing the Stub when I start the server program. However, the client throws the following exception: RemoteException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: suncertify.server.DatabaseServer_Stub (no security manager: RMI class loader disabled) Can anyone kindly give me some idea on my problem? Thank you very much!
The consensus in this group has been that you don't need to implement dynamic downloading, codebase, HTTP servers, security managers, or policy files for this assignment. Just package your stubs with the client, that's it. Eugene.
You don't need to generate _skel classes starting jsdk1.2. Like Eugene mentioned, you don't have to use codebase, RMI security manager or java.policy file for this assignment. If you like to use codebse, you have to go with only file URL and not HTTP server. Since you are supposed to develop a system which works across all the platforms, you have to write code to get the current directory and set the System property in side your code. In my submission, I bundled _Stub files with the client.jar.
Hi, I am at the point of implementing RMI too. I will follow your point not to generate _skel classes, and not to have codebase, RMI security manager or java.policy file. But what means that we have to write code to get the current directory and set the System property in side our code? Appreciated if anybody could explain more. Linda
You don't need to generate _skel classes starting jsdk1.2. When I used rmic compiler to compile the server implementation we get both skelton as well as stub class. Please point me to the location where I could refer to RMI with reference to jsdk1.2 . Thanks Ravi
I have referred to tutorial on RMI on sun site. In the Java 2 SDK implementation of RMI, the new wire protocol has made skeleton classes obsolete. After you run rmic you should find the file Calculator_Stub.class and, if you are running the Java 2 SDK, Calculator_Skel.class. My question is if we don't skelton class on server side i.e server side proxy how does the server handle the client request ? Would it be sufficient for me to just copy the stub class to the client side and let the client make the request to server through the stub? The server object shall inherently handle the incoming request itself. Thanks Ravindra
SCEA, SCBCD, SCWCD, SCJD, SCJP
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad: