File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes RMI issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI issue" Watch "RMI issue" New topic

RMI issue

satya sahu
Ranch Hand

Joined: Mar 26, 2003
Posts: 97
Hi i am trying to execute a simple RMI Program over a network.
I have deployed the interface file and the server file in one system and the client program withe the interface file at another system.
I have ran the server.
Now when i tried to run the client i am getting following exception.

Exception in thread "main" java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: MyServer_Stub (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(
at MyClient.main(
Caused by: java.lang.ClassNotFoundException: MyServer_Stub (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(
at sun.rmi.server.LoaderHandler.loadClass(
at java.rmi.server.RMIClassLoader$2.loadClass(
at java.rmi.server.RMIClassLoader.loadClass(
at sun.rmi.server.MarshalInputStream.resolveClass(
... 3 more
Nishant Verma
Ranch Hand

Joined: Jun 14, 2006
Posts: 41
Dear Satya

Please try setting the JVM parameter -Djava.rmi.server.codebase. This should be set to the server directory from where client will download the java classes.


"Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
I agree. Here's the link:
subject: RMI issue
It's not a secret anymore!