JDK-6608334 : JConsole fails to display MBean operation with return type
  • Type: Bug
  • Component: tools
  • Sub-Component: jconsole
  • Affected Version: 6u2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-09-24
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10Fixed 7 b25Fixed
Description
While trying to display an MBean operation defined in a Dynamic MBean by a custom MBeanInfo.
In this MBeanOperationInfo, if the returnType element is set to null, the JConsole fails to display the operation and a pop-up error window with no message is displayed.

Comments
EVALUATION JConsole should display the operation with null as return value such that it doesn't prevent the user from invoking the operation however it should log a warning about this fact.
26-10-2007

WORK AROUND Just use Void.TYPE.getName() instead of <null>
24-09-2007

SUGGESTED FIX It appears that the <null> value is not supported by JMX specifications for the returnType element of one MBeanOperationInfo. Two solutions: 1. The JConsole handles this special case and consider the <null> value as a Void type 2. The JConsole tests the returnType element and throw an Exception if it is <null> The second approach seems best since it would trigger the developer to write a better MBeanInfo while first solution will somewhat "hide" the real problem form the developer.
24-09-2007