1. Junior Member
Join Date
Jun 2006
Posts
18

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. Junior Member
Join Date
Jun 2007
Posts
4

3. Senior Member
Join Date
Mar 2005
Location
The Netherlands
Posts
121
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
•