IBM Support

JR45811: PARALLEL REST API CALL FAIL INTERMITTENTLY WITH JAVA.LANG.ARRAYINDEXOUTOFBOUNDSEXCEPTION ORJAVA.LANG.NULLPOINTER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Exceptions may occur when executing a large amount of REST API
    calls in parallel. The JAXBContext may run into a non-thread
    safe situation where marshallers collide, causing an exception
    during serialization.
    Typical stack trace are:
    --------------- ArrayIndexOutOfBoundsException Start -----------
    [1/9/13 23:53:20:448 CET] 00000b17 webapp        E
    com.ibm.ws.webcontainer.webapp.WebApp logServletError
    SRVE0293E: [Servlet Error]-[RestAPIServlet]:
    java.lang.ArrayIndexOutOfBoundsException
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    put(NamespaceContextImpl.java:286)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    declareNsUri(NamespaceContextImpl.java:236)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    declareNamespace(NamespaceContextImpl.java:368)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsXsiType
    (XMLSerializer.java:678)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.property.SingleElementNodePr
    operty.serializeBody(SingleElementNodeProperty.java:156)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeB
    ody(ClassBeanInfoImpl.java:357)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsSoleCon
    tent(XMLSerializer.java:599)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeR
    oot(ClassBeanInfoImpl.java:341)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XM
    LSerializer.java:500)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.write(Marshal
    lerImpl.java:320)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.marshal(Marsh
    allerImpl.java:249)
     at
    javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMa
    rshallerImpl.java:74)
     at
    com.ibm.xml.xlxp2.jaxb.marshal.MarshallerImpl.marshal(Marshaller
    Impl.java:184)
     at
    org.apache.wink.common.internal.providers.entity.xml.JAXBXmlProv
    ider.writeTo(JAXBXmlProvider.java:191)
     at
    org.apache.wink.server.internal.handlers.FlushResultHandler.hand
    leResponse(FlushResultHandler.java:199)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:38)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:39)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:39)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.internal.log.Responses.handleResponse(Res
    ponses.java:90)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.run(Abstra
    ctHandlersChain.java:52)
     at
    org.apache.wink.server.internal.RequestProcessor.handleRequestWi
    thoutFaultBarrier(RequestProcessor.java:212)
     at
    org.apache.wink.server.internal.RequestProcessor.handleRequest(R
    equestProcessor.java:154)
     at
    org.apache.wink.server.internal.servlet.RestServlet.service(Rest
    Servlet.java:124)
     at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    .....
    --------------- ArrayIndexOutOfBoundsException End -------------
    --------------- java.lang.NullPointerException Start -----------
    [1/9/13 23:53:20:449 CET] 00000b19 webapp        E
    com.ibm.ws.webcontainer.webapp.WebApp logServletError
    SRVE0293E: [Servlet Error]-[RestAPIServlet]:
    java.lang.NullPointerException
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.Coordinator.popCoordinator(C
    oordinator.java:162)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.close(XMLSeria
    lizer.java:862)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.write(Marshal
    lerImpl.java:329)
     at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.marshal(Marsh
    allerImpl.java:249)
     at
    javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMa
    rshallerImpl.java:74)
     at
    com.ibm.xml.xlxp2.jaxb.marshal.MarshallerImpl.marshal(Marshaller
    Impl.java:184)
     at
    org.apache.wink.common.internal.providers.entity.xml.JAXBXmlProv
    ider.writeTo(JAXBXmlProvider.java:191)
     at
    org.apache.wink.server.internal.handlers.FlushResultHandler.hand
    leResponse(FlushResultHandler.java:199)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:38)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:39)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandler.handleResponse(A
    bstractHandler.java:39)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.internal.log.Responses.handleResponse(Res
    ponses.java:90)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:26)
     at
    org.apache.wink.server.handlers.ResponseHandlersChain.handle(Res
    ponseHandlersChain.java:22)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:67)
     at
    org.apache.wink.server.handlers.AbstractHandlersChain.run(Abstra
    ctHandlersChain.java:52)
     at
    org.apache.wink.server.internal.RequestProcessor.handleRequestWi
    thoutFaultBarrier(RequestProcessor.java:212)
     at
    org.apache.wink.server.internal.RequestProcessor.handleRequest(R
    equestProcessor.java:154)
     at
    org.apache.wink.server.internal.servlet.RestServlet.service(Rest
    Servlet.java:124)
     at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    ....
    --------------- java.lang.NullPointerException End -------------
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Process applications executing REST API     *
    *                  calls under load.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION: When running a large amount of REST     *
    *                      API calls in an instant, exceptions     *
    *                      may occur.                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Running REST API calls under load may cause
    ArrayIndexOutOfBoundsException and NullPointerExceptions. The
    marshalling code may run into a situation where the marshaller
    is not unique to the thread and multiple threads attempt to
    serialize using the same marshaller object.
    The following exception may be seen:
    java.lang.NullPointerException
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.Coordinator.popCoordinator(C
    oordinator.java:162)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.close(XMLSeria
    lizer.java:862)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.write(Marshal
    lerImpl.java:329)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.marshal(Marsh
    allerImpl.java:249)
    at
    javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMa
    rshallerImpl.java:74)
    at
    com.ibm.xml.xlxp2.jaxb.marshal.MarshallerImpl.marshal(Marshaller
    Impl.java:184)
    at
    org.apache.wink.common.internal.providers.entity.xml.JAXBXmlProv
    ider.writeTo(JAXBXmlProvider.java:191)
    -----------------------------------------------
    java.lang.ArrayIndexOutOfBoundsException
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    put(NamespaceContextImpl.java:286)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    declareNsUri(NamespaceContextImpl.java:236)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.output.NamespaceContextImpl.
    declareNamespace(NamespaceContextImpl.java:368)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsXsiType
    (XMLSerializer.java:678)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.property.SingleElementNodePr
    operty.serializeBody(SingleElementNodeProperty.java:156)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeB
    ody(ClassBeanInfoImpl.java:357)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsSoleCon
    tent(XMLSerializer.java:599)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeR
    oot(ClassBeanInfoImpl.java:341)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XM
    LSerializer.java:500)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.write(Marshal
    lerImpl.java:320)
    at
    com.ibm.jtc.jax.xml.bind.v2.runtime.MarshallerImpl.marshal(Marsh
    allerImpl.java:249)
    at
    javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMa
    rshallerImpl.java:74)
    

Problem conclusion

  • Code has been implemented to make the marshaller thread safe
    to prevent these exceptions from happening. A new property is
    also introduced, <jaxbcontext-reuse-enabled>. This can be
    enabled in the 100Custom.xml config file. The property allows
    the user to disable the Wink caching and not reuse the
    marshallers.
    
    An interim fix is available on v8.0.1.0 and
    v8.0.1.1. The fix is also integrated into the next fix pack
    release.
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR45811

  • Reported component name

    BPM ADVANCED

  • Reported component ID

    5725C9400

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-02-21

  • Closed date

    2013-04-26

  • Last modified date

    2013-04-26

  • 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

    BPM ADVANCED

  • Fixed component ID

    5725C9400

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSFTN5","label":"IBM Business Process Manager Advanced"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 January 2022