JDK-6530969 : JDK 1.5.0_06 JConsole exception when receiving JMX Notification
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-05
  • Updated: 2010-07-29
  • Resolved: 2007-03-21
Description
FULL PRODUCT VERSION :
C:\Program Files\Java\jdk1.5.0_06\bin>java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
I am using JConsole as my JMX Client that will invoke methods and receive JMX Notification froma custom MBean running on Weblogic 9.2. After connecting to the WebLogic JMX Server, JConsole can see the WebLogic Mbeans and JConsole can see my custom Mbean. In that custom Mbean there is one Operations and I am able to invoke it and the custom mbean running in Weblogic 9.2 gets called correctly. But then I subscribe for Notifications from that custom Mbean. When the Mbean sends out the Notification the JConsole system out receives the following exception:
C:\Program Files\Java\jdk1.5.0_06\bin>jconsole.exe
Feb 21, 2007 9:08:01 AM ClientNotifForwarder NotifFetcher-run
SEVERE: Failed to fetch notification, stopping thread. Error is: java.rmi.MarshalException: CORBA MARSHAL 0 Maybe;
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
        at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
        at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
        at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.fetchNotifications(Unknown Source)
        at javax.management.remote.rmi.RMIConnector$RMINotifClient.fetchNotifs(RMIConnector.java:1282)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.fetchNotifs(ClientNotifForwarder.java:508
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:399)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:83)
Caused by: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Register an Mbean in Weblogic 9.2, and that Mbean will send out a JMX Notifications.
- Deploy the application in WebLogic 9.2 that register the Mbean.
- After deploying the web app and starting it up in WebLogic 9.2 start JConsole.
- Have the web app. register to the mbean server and make it send out a JMX Notifcation.
- Have JConsole connect to the JXM URL: service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime
- In JConsole you will see the Mbean in the list that was registered by the web app.
- Now make the web app. send out another JMX Notification and then in the system out of jconsole you will see the following exception:
C:\Program Files\Java\jdk1.5.0_06\bin>jconsole.exe
Feb 21, 2007 9:08:01 AM ClientNotifForwarder NotifFetcher-run
SEVERE: Failed to fetch notification, stopping thread. Error is: java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
        at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
        at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
        at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.fetchNotifications(Unknown Source)
        at javax.management.remote.rmi.RMIConnector$RMINotifClient.fetchNotifs(RMIConnector.java:1282)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.fetchNotifs(ClientNotifForwarder.java:508)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:399)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:83)
Caused by: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
        at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
        at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
        at com.sun.jmx.remote.internal.ProxyStub._invoke(Unknown Source)
        ... 5 more





EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I was expecting JConsole to display the JMX Notification in the Notification[0] tab o that MBean.

ACTUAL -
IC:\Program Files\Java\jdk1.5.0_06\bin>jconsole.exe
Feb 21, 2007 9:08:01 AM ClientNotifForwarder NotifFetcher-run
SEVERE: Failed to fetch notification, stopping thread. Error is: java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
        org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
        at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
        at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
        at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.fetchNotifications(Unknown Source)
        at javax.management.remote.rmi.RMIConnector$RMINotifClient.fetchNotifs(RMIConnector.java:1282)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.fetchNotifs(ClientNotifForwarder.java:508)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:399)
        at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:83)
Caused by: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0 completed: Maybe
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
        at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
        at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
        at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
        at com.sun.jmx.remote.internal.ProxyStub._invoke(Unknown Source)
        ... 5 more





REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
This problem happens in JConsole. I can send you the WebLogic 9.2 test web app.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
There is no workaround right now, JMX Notification from WebLogic 9.2 are not being received.

Comments
EVALUATION The client confirms that it works if the source of his notification is either the reference object of his mbean or a serializable object, this is exact what the jmx spec specifies. So there is no bug here.
21-03-2007

EVALUATION Still need to verify with the client that which object he set to the notification. If it was the reference of the mbean which sent the notification then the problem is from the Weblogic 9.2 and it is a bug, otherwise is a problem from the client test, because the spec says that the MBeanServer will do replacement only "If the source of the notification is a reference to the MBean object". In the latter case the client should set the source either to a serializable object, or to the mbean reference.
21-03-2007

EVALUATION The problem is from the Weblogic 9.2. According to the MBeanServer spec: "A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged." In the user test, the source of the notification was set to "this" which was the mbean reference, and it was not serializable. Because the MBeanServer within the Weblogic 9.2 did not replace the source with the mbean ObjectName, the connector got an exception, which should be NotSerializableException but we did not see it because the iiop connector gave really terrible info. We asked the user to set the source to a String instead of the mbean reference, the test was passed. The bug will be closed.
21-03-2007