IBM Support

PI12873: JAXB unmarshaller may return an unexpected null value with respect to an attribute being declared in it's superclass.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An attribute which is XML-mapped to a class using JAXB does not
    get unmarshalled when it is declared in it's superclass
    resulting in a null value being returned. Exceptions such as
    the following may occur:
    
    ERROR - [corid=, uid=, cid=, rid=, r=] Task ExampleTask
    threw exception on execution (retainIfException=true):
    javax.xml.bind.DataBindingException:
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at javax.xml.bind.JAXB.unmarshal(JAXB.java:220)
    
    atxx.xxxxx.unmarshal(xxxImpl.java:1042)
    
    ...
    at sun.reflect.GeneratedMethodAccessor756.invoke(Unknown
    Source)
    
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(xxAccessImpl.jav
    a : 5 5 )
    
    ...
    
    Caused by: javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.unmarshaller.UnmarshallerImp
    l.handle
    StreamException(UnmarshallerImpl.java:456)
    ..
    
    Caused by: javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at
    com.ibm.xml.xlxp2.api.stax.msg.StAXMessageProvider.throwWrappedX
    ML StreamException(StAXMessageProvider.java:76)
    at
    com.ibm.xml.xlxp2.api.stax.XMLStreamReaderImpl.produceFatalError
    Event(XM
    LStreamReaderImpl.java:2008)
    at
    com.ibm.xml.xlxp2.api.jaxb.JAXBXMLStreamReader.produceFatalError
    Event(JAXBXMLStreamReader.java:321)
    at
    com.ibm.xml.xlxp2.scan.DocumentScanner.reportFatalError(Document
    Scanner.
    java:4871)
    
    This issue occurs at WebSphere Application Server 8.5.5.1 and
    not at 8.5.0.1
    

Local fix

  • Set com.ibm.xml.xlxp.jaxb.opti.level=0 or
    com.ibm.xml.xlxp.jaxb.opti.level=2
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server.                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: JAXB unmarshaller may return            *
    *                      unexpected null value with respect to   *
    *                      an attribute being declared in it's     *
    *                      parent class.                           *
    ****************************************************************
    * RECOMMENDATION:  Install a fix pack that contains this       *
    *                  APAR.                                       *
    ****************************************************************
    An attribute which is XML-mapped to a class using JAXB does not
    get unmarshalled when it is declared in it's superclass
    resulting in a null value being returned. Exceptions such as
    the
    following may occur:
    ERROR - [corid=, uid=, cid=, rid=, r=] Task ExampleTask
    threw exception on execution (retainIfException=true):
    javax.xml.bind.DataBindingException:
    javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at javax.xml.bind.JAXB.unmarshal(JAXB.java:220)
    atxx.xxxxx.unmarshal(xxxImpl.java:1042)
    ...
    at sun.reflect.GeneratedMethodAccessor756.invoke(Unknown
    Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(xxAccessImpl.jav
    a : 5 5 )
    ...
    Caused by: javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.unmarshaller.UnmarshallerImp
    l.handle
    StreamException(UnmarshallerImpl.java:456)
    ..
    Caused by: javax.xml.stream.XMLStreamException:
    The value of the attribute "url" has to start with a single
    or double quotation mark.
    at
    com.ibm.xml.xlxp2.api.stax.msg.StAXMessageProvider.throwWrappedX
    ML StreamException(StAXMessageProvider.java:76)
    at
    com.ibm.xml.xlxp2.api.stax.XMLStreamReaderImpl.produceFatalError
    Event(XM
    LStreamReaderImpl.java:2008)
    at
    com.ibm.xml.xlxp2.api.jaxb.JAXBXMLStreamReader.produceFatalError
    Event(JAXBXMLStreamReader.java:321)
    at
    com.ibm.xml.xlxp2.scan.DocumentScanner.reportFatalError(Document
    Scanner.
    java:4871)
    

Problem conclusion

  • In the creation of the JAXB model, gathering method objects
    does not take much consideration for class hierarchy. This has
    potential to cause an attribute which is XML-mapped to a class
    using JAXB, to not get unmarshalled when the attribute is
    declared in a parent class. This therefore, can result in a
    null value being returned instead of an expected value.
    
    The issue was fixed by ensuring that the JAXB model keeps a
    cache of the attributes it processes in both child and parent
    classes. This adds the intelligence the JAXB model needs to
    deal with polymorphic attributes.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.5.3.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI12873

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-03-03

  • Closed date

    2014-04-01

  • Last modified date

    2014-04-01

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022