Java: no security manager: RMI class loader disabled

Remote class loading can be tricky.

The original post doesn’t include any information about the code base. It may be that the client’s security configuration is correct, but it has no access to the remote code. The classes are loaded directly from the “code base” by the client. They are not presented to the client by the service over the RMI connection. The service merely references an external source for the classes.

The server should specify the system property java.rmi.server.codebase. The value must be a URL that is accessible to the client, from which the necessary classes can be loaded. If this is a file: URL, the file system must be accessible to the client.

And the other way around: If the server should be able to load classes from the client (like here), the client must set the code base property to a URL that is accessible to the server.

Leave a Comment