Your original problem that caused this exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.softwareplant.util.lang.POJO (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:355)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
is caused by the fact during cache replication in Data Center RMI uses webapp class loader to deserialize cache invalidation message and not OSGi class loader associated with your plugin’s OSGi bundle.
The easiest way to work around this problem is to use keys that can be serialized/deserialized by webapp class loader (e.g. java.lang.String). (As long as you use loading cache and do not call put() on it you should be fine with using your own classes as cache values).
I’ve created a bug that you can watch: [JRASERVER-65246] Plugin caches in Data Center throw ClassNotFoundException on invalidation if custom classes are used as keys - Create and track feature requests for Atlassian products.