IBM Support

PI42710: JAVAX.XML.BIND.UNMARSHALEXCEPTION: UNEXPECTED ELEMENT ERROR CAN OCCUR ON FIRST REQUEST

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • org.apache.cxf.interceptor.Fault: Unmarshalling Error:
    unexpected element (uri:"http://example.com/dyns/ws",
    local:"clientId"). Expected elements are
    <{http://example.com/>,<{http://example.com/ dyns/w
    s/aaaaaaaaaaaa/}sessionToken>,<{http://example.com/ S}produktId
    >,....
    ......
    .....
     at
    org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDec
    oder.java:836)
     at
    org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDec
    oder.java:657)
     at
    org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:1
    61)
     at
    org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage
    (DocLiteralInInterceptor.java:203)
     at
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInte
    rceptorChain.java:262)
     at
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(Chain
    InitiationObserver.java:121)
     at
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abs
    tractHTTPDestination.java:211)
     at
    com.ibm.ws.jaxws.endpoint.AbstractJaxWsWebEndpoint.invoke(Abstra
    ctJaxWsWebEndpoint.java:138)
     at
    com.ibm.ws.jaxws.webcontainer.LibertyJaxWsServlet.handleRequest(
    LibertyJaxWsServlet.java:135)
     at
    com.ibm.ws.jaxws.webcontainer.LibertyJaxWsServlet.doPost(Liberty
    JaxWsServlet.java:94)
     at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
     at
    com.ibm.ws.jaxws.webcontainer.LibertyJaxWsServlet.service(Libert
    yJaxWsServlet.java:86)
    .....
    .....
    Caused by: javax.xml.bind.UnmarshalException: unexpected
    element ....zzzzzzaaaaaacccc
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.ha
    ndleEvent(UnmarshallingContext.java:651)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Load
    er.java:267)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Load
    er.java:262)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpected
    ChildElement(Loader.java:128)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loa
    der.java:106)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childEl
    ement(StructureLoader.java:250)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._s
    tartElement(UnmarshallingContext.java:487)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.st
    artElement(UnmarshallingContext.java:468)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.han
    dleStartElement(StAXStreamConnector.java:260)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bri
    dge(StAXStreamConnector.java:194)
     at
    com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmars
    hal0(UnmarshallerImpl.java:374)
     ... 29 more
    Caused by: javax.xml.bind.UnmarshalException: unexpected
    element (uri:"sdasdasdsd"). Expected elements are ........>
     ... 40 more
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile - Web Services (JAX- *
    *                  WS, JAX-RS)                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: Different event handler used for JAXB   *
    *                      unmarshaller causes inconsistent        *
    *                      behavior when unmarshalling             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    To improve performance, a JAXB unmarshaller pool is used. When
    the unmarshaller is created, the event handler is the
    unmarshaller itself. Old code set the event handler to NULL
    before putting the unmarshaller in the pool, and JAXB
    implementation sets the event handler to the default handler.
    When an unmarshaller is obtained from the pool, the default
    event handler is used rather than the unmarshaller itself. You
    may get inconsistent behavior because the different event
    handler is used.
    

Problem conclusion

  • We no longer set the event handler to NULL before putting the
    unmarshaller in the pool. Now the unmarshaller will always use
    itself as the event handler.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.7.  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

    PI42710

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-06-10

  • Closed date

    2015-06-18

  • Last modified date

    2015-06-18

  • 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

  • R700 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":"7.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022