IBM Support

IV46281: JAXB MARSHALLER SETTING XSI:NIL ATTRIBUTE AS 'TRUE' FOR ELEMENTS WHICH ARE HAVING NON NILLABLE VALUE AFTER APPLYING JAVA 6 SR8

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: The problem is found while an UnMarshaller o/p is
    being fed as input for Marshaller. The Marshaller will produce
    xsi:nill="true" for those elements having a value with
    UnMarshalled o/p.
    For example, for if an unmarshaller o/p is
    <ns2:ImageCaptureDetail xmlns:ns2="http://test.com//sample">
     <ns2:CaptureDate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:nil="true"/>
     <ns2:CaptureResolutionCode ></ns2:CaptureResolutionCode>
    </ns2:ImageCaptureDetail>
    The JAXB marshaller will produce
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ImageCaptureDetail xmlns="http://test.com//sample">
        <CaptureDate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:nil="true"/>
        <CaptureResolutionCode
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:nil="true">1</CaptureResolutionCode>
    </ImageCaptureDetail>
    Here with marhsaller o/p CaptureResolutionCode should not have
    xsi:nil attribute as the element is having data. The problem
    happens for JAXBElement wrapping which is being done by XJC. The
    issue is not happening for List (ArrayList) or for plain object
    type.
    .
    Stack Trace: N/A
    .
    

Local fix

  • Modify schema to include maxOccurs="unbounded" for problematic
    elements or avoid using substitutionGroup elements with
    attribute.
    

Problem summary

  • The problem happens as 'nil' state variable inside JAXB
    unmarshaller implementation is not being reset during XML
    element push and pop operation. The value set for previous
    element is being carry forwarded for the next elements.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR15
    7.0.0 SR6
    6.0.1 SR7
    .
    Change is being made to reset 'nil' state variable inside IBM
    JVM JAXB unmarshaller implementation correctly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV46281

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-07-29

  • Closed date

    2013-09-23

  • Last modified date

    2013-10-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
21 October 2013