RFR: 8019584 javax/management/remote/mandatory/loading/MissingClassTest.java failed in nightly against jdk7u45: java.io.InvalidObjectException: Invalid notification: null
David Holmes
david.holmes at oracle.com
Mon Jul 15 18:01:09 PDT 2013
On 15/07/2013 6:41 PM, Jaroslav Bachorik wrote:
> Please, review the patch for https://jbs.oracle.com/bugs/browse/JDK-8019584
>
> http://cr.openjdk.java.net/~jbachorik/8019584/webrev.00/
>
> The reason for the failure is that the ObjectInputStream.readFields()
> method does not throw CNFE as specified when encountering instances of
> unknown in the object graph to be deserialized. Instead, it leaves the
> fields in the default state which in this case is "null" and is not
> valid. Hence, the deserialization validation fails.
>
> Since the main cause is in the RMI code, has been there for very long
> time and changing the behaviour there might have disrupting effects on
> various 3rd party applications I decided to work around this problem in
> the JMX code.
Can you pinpoint the code that actually fails to propagate the
ClassNotFoundException - I don't see any issue in OIS.readFields itself
so this comes from elsewhere. Failing to throw CNFE when deserializing
seems like a major bug to me.
Thanks,
David
> The workaround adds InvalidObjectException to the list of expected
> exceptions when processing JMX notifications. It is treated the same way
> as eg. CNFE - the exception is logged and the notification will be
> reported as missing. This will resolve the problem on the JMX side.
>
> Thanks,
>
> -JB-
>
More information about the serviceability-dev
mailing list