Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ClassNotFoundException (no security manager: RMI class loader disabled)

843793Jan 9 2009 — edited Jan 9 2009
Hi Java experts,

I have been baffled with an exception shown below for around 3 days now, and cannot resolve it no matter what I throw at it. I've been googling around and everyone mostly talks about jboss and EJB but no one talks about just the normal standard JDK... it's just hard to find someone with similar problems.

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.systemcontroller.ReceiverPool (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at com.systemcontroller.manager.ReceiverManager.registerReceiverPool(ReceiverManager.java:144)
at com.systemcontroller.manager.ReceiverManager.initialise(ReceiverManager.java:108)
at com.systemcontroller.core.SystemController.intialisePlugins(SystemController.java:159)
at com.systemcontroller.core.SystemController.run(SystemController.java:102)
at com.systemcontroller.core.SystemController.main(SystemController.java:87)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.systemcontroller.ReceiverPool (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.systemcontroller.ReceiverPool (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)
... 12 more

One thing I should note also is that the ReceiverPool is an interface, and the exception is being thrown at the bolded line in the code below:

private boolean registerReceiverPool(List<Receiver> pool) {
mgr = new ReceiverPoolImpl(pool);
try {
UnicastRemoteObject.exportObject(mgr, 0);
Naming.rebind(ReceiverPool.POOL_SERVICE_NAME, mgr);
return true;
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}

This piece of code is in the ReceiverManager class. Also, ReceiverPoolImpl is an implementation of the ReceiverPool interface. I'm just baffled with the exception: java.lang.ClassNotFoundException: com.systemcontroller.ReceiverPool (no security manager: RMI class loader disabled). I seriously don't know what is causing it. The first thoughts people make in other forums that have similar problems is whether the client can access any of the server classes. I don't really think this is an issue in my case because all the files that you see above, are all within the same project, and run on the same machine.

If anyone could shed some light on this, I would be very grateful.

Kind regards,

Noah.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2009
Added on Jan 9 2009
1 comment
1,225 views