i am using JBuilder 5 Personal IDE in my Win98. If i configure VM parameters like "...policy""...codebase=C:/WINDOWS/jbproject/certify/classes/certify", the message shows up like: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: certify.RemoteDataImpl_Stub If i put file:// in, like "...policy""...codebase=file://C:/.../classes/certify/", the exception changes to: java.security.AccessControlException: access denied (java.io.FilePermission \\C\WINDOWS\jbproject\certify read) Could anyone help about how to get around these exceptions and get the server implementations binded to registry?! Thanks a lot in advance. Sincerely, Daniel [This message has been edited by Daniel Wu (edited August 19, 2001).] [This message has been edited by Daniel Wu (edited August 19, 2001).]
Based on my own experience, I'd guess that the service interface is not available for download from the web server. Remember that before the client gets a stub, rmiregistry's classloader loads _and resolves_ the stub class by using the codebase property. The interface(s) implemented by the stub class must be available via codebase or rmiregistry fails to bind. This shows up as an unmarshalling exception no matter how much we'd like it to show up as a binding exception. Or I'm way off. After all, it's just a guess. ------------------ Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
posted 18 years ago
Thanks Michael! Sorry i've to clarify a bit. Right now i am just testing my server program, and i have no problem constructing an object. But when i bind the object (server implementations) to RMIRegistry, the exceptions occur!
Originally posted by Michael Ernest: Remember that before the client gets a stub, rmiregistry's classloader loads _and resolves_ the stub class by using the codebase property. The interface(s) implemented by the stub class must be available via codebase or rmiregistry fails to bind.
My stub class implements two interfaces: certify.RemoteData,and java.rmi.Remote; how should i make the interfaces available via codebase???my current codebase is: "-Djava.rmi.server.codebase=file://C:\windows\jbproject\certify\classes\certify/" for which i got an Error: Error: java.security.AccessControlException: access denied (java.io.FilePermission \\C\WINDOWS\jbproject\certify\classes\certify read) Also, the interface class certify.RemoteData is included in the folder classes\certify, so do i need to put it in codebase again, if so, how? Thank you very much for consideration! Daniel
[This message has been edited by Daniel Wu (edited August 22, 2001).]
Same problem here, as Daniel describes. I can't figure out why I'd get an accesscontrolexception on attempting to access the codebase path. My permissions allow all file read, execute, write privileges. Still, this exception upon Naming.rebind(). Any resolution?
Well, I am not an advocate of using an IDE for the assignment as many errors can occur from the IDE adding some proprietary stuff that won't fly in the submission. Now on a second note you should not need to use Codebase at all. Codebase is usually used when you are dynamically downloading stubs, which in this assignment we are not doing. The assessor will not have a web server. You will include the stubs in the client.jar. Also for the ACLs you can remove the RMISecurityManager and this will most likely stop those errors. Mark Mark