I created a RMI Client and Server for my Java class. The programs where placed in their respective packages.
Result: The server used to get compiled correctly, on compiling the Cilent it gives an error
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
To my surprise the program worked perfectly fine when, the same program was placed in default folder of respective packages.
Now my question is Why is such behavior?. And how do I compile the program when they are placed in packages? Do leave me your comments..
Updated...
Error
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: com.Ejb.Server.HelloService (no security manager: RMI class loader disabled) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.Ejb.Client.HelloClient.main(HelloClient.java:16) Caused by: java.lang.ClassNotFoundException: com.Ejb.Server.HelloService (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source) at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source) at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source) at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source) at java.io.ObjectInputStream.readProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) ... 2 more