rmi registry basic question
I'm trying my first rmi application using eclipse and genady's rmi tools. The application will use a client to query a server database. The query will be done on the server and the result returned to the client.
Everything works just fine so long as I'm on a single machine. The problem is that I can't get it to respond if I move the client to another machine.
Just to make things concrete, I'm developing the server on //home-ilan and I want //home-yona to run the client. On home-ilan I have f:\eclipse\workspace shared out as //home-ilan/workspace, and I indeed see this URL on home-yona.
If I run Genady's RMI Spy, I see when my local machine running the client turns to itself and queries the database. If I try to run the client from home-yona, RMI Spy shows no activity.
My suspicion is that home-yona isn't looking at home-ilan to pick up the stub. On home-yona I have the client, rmi_security.policy and a bat file to run the program. On home-ilan I have rmiregistry running, the server is running and the console tells me that StudiesEngine is bound in the registry. Thus everything looks OK on the server.
My bat file on the client says:
C:\Ilan\ReadStudies>java -cp .;//home-ilan/workspace -Djava.security.policy=c:\i
lan\ReadStudies\rmi_security.policy -Djava.rmi.server.codebase=file://home-ilan/
workspace/ReadStudies/ -Djava.rmi.server.hostname=home-ilan client/StudiesClient
It gives a short error message when I run it:
QueryServer err: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: access to class loader denied
Just for completeness my security.policy is:
grant {
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc", "read";
permission java.util.PropertyPermission "file.encoding", "read";
permission java.net.SocketPermission "*:1024-65535", "connect,accept";
permission java.net.SocketPermission "*:80", "connect";
};
Again, my suspicion is that home-yona isn't even looking at home-ilan and thus it doesn't see the home-ilan rmiregistry. Can anyone tell me if this is true or false? Maybe I need an http server? If so, is there a trivial one which I can use to test?
Thanks,
Ilan

