0

I have a MBean that throws a runtime exception to the effect

Error during MBean operation invocationMessage: RuntimeException thrown in RequiredModelMBean while trying to invoke operation someMethod

Is there a way I can coax the exception to display a more informative message to the JMX MBean Management Console

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150

1 Answers1

0

Which console?

In both VisualVM and JConsole, I get

Problem invoking fooBar: java.lang.RuntimeException: foo

where foo is the exception's message property.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • That's no help at all - what app server? i.e. what is listening on 8080? – Gary Russell Jun 15 '15 at 17:47
  • its listening on a custom port 37071 and on tomcat – Anand Sunderraman Jun 17 '15 at 19:34
  • But what do you have deployed on tomcat in `/mbean` servlet path? You must have some war file deployed there; AFAIR, tomcat doesn't come with a web-based mbean console. It's that code that you need to fix to provide more information about the exception. – Gary Russell Jun 17 '15 at 21:28