Skip to main content

UndeclaredThrowableException returned instead of Exception (JMX in Glassfish v2 vs v3)

No replies
caddis16
Offline
Joined: 2013-03-28
Points: 0

I have a standalone Java client that uses JMX to administer a server application running inside the Glassfish container. Whenever the server encounters an exception, it throws Exception which is returned to the client via the proxy and handled appropriately by the client.

This is how it worked in Glassfish v2. When we switched to Glassfish v3, the Exception is now wrapped inside an UndeclaredThrowableException and I have to parse that exception to get the underlying cause.

Could someone tell my why this changed between v2 and v3 and how best to handle it?