United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6608334 JConsole fails to display MBean operation with <null> return type
6608334 : JConsole fails to display MBean operation with return type

Details
Type:
Bug
Submit Date:
2007-09-24
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
tools
OS:
generic
Sub-Component:
jconsole
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u2
Fixed Versions:
7

Related Reports
Backport:

Sub Tasks

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.
                                     
2007-10-26
WORK AROUND

Just use Void.TYPE.getName() instead of <null>
                                     
2007-09-24
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.
                                     
2007-09-24



Hardware and Software, Engineered to Work Together