Trying to expose an object over JMX but I'm getting security issues when I try and expose objects in my codebase. I understand that I probably need to set up a security manager and explicitly expose these objects over RMI but shouldn't this be done for me by the spring configuration as I explicitly define the objects/methods I'm exposing?

Error I get follows:

Problem invoking getStatus : java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: com.bla.bla.Feed$Status (no security manager: RMI class loader disabled)

Thanks for any pointers!