Results 1 to 3 of 3

Thread: RMI class loader disabled

  1. #1
    Join Date
    Jun 2006
    Posts
    18

    Default 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. #2
    Join Date
    Jun 2007
    Posts
    4

  3. #3
    Join Date
    Mar 2005
    Location
    The Netherlands
    Posts
    121

    Default

    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):
    Code:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •