Announcement Announcement Module
No announcement yet.
RMI class loader disabled Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • RMI class loader disabled

    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!

  • #2
    Go to this Link



    • #3
      You'll only get this error if the classes that are serialized over JMX aren't present at the client side. Instead of using an RMI ClassLoader, you can also just include the classes in your JMX client.

      If you're using JConsole, you can start it up like this to add some jars to its classpath (replace the paths to point to your local SDK):
      jconsole -J-Djava.class.path=c:\java\jdk1.6.0_01\lib\jconsole.jar;c:\java\jdk1.6.0_01\lib\tools.jar;c:\path\to\local.jar
      That means, always include jconsole.jar and tools.jar and then include your own.