under Netbeans ,I created a project containing an interface "i_object" This interface represents the remote object "impl_i_object" and "impl_i_object" implements all the interface method. one main class to the client "Main_client" and one for the server "Main_server" ... when I start the server and the client its work smoothly.
But when I separated from my project into two projects (client and server) look at the screenshot:
here, when I run the server it works but when I run the client it display this error :
Exception in thread "main" java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: server.i_object (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at client.Main_client.main(Main_client.java:24)
Caused by: java.lang.ClassNotFoundException: server.i_object (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:554)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:646)
at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:311)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:257)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1549)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1511)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
... 3 more
Java Result: 1
what's the problem ?
it says :
no security manager: RMI class loader disabled
RMI requires a security manager to run.
Example:
http://www.coderanch.com/t/459111/java/java/no-security-manager-rmi-class
UPDATE: This link talks about the security in RMI