IBM Support

PM15029: INVOKING AN XSLT, XPATH OR XQUERY EXECUTABLE THE FIRST TIME IN MULTI-THREADED PROGRAM MAY CAUSE ARRAYINDEXOUTOFBOUNDSEXCEPTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • If a multi-threaded program creates XExecutable objects for one
    or more XSLT stylesheets, XQuery expressions or XPath, and two
    or more threads invoke any of the execute methods of those
    XExecutable objects for the first time at nearly the same time,
    an ArrayIndexOutOfBoundsException may be reported for one of the
    calls to an execute method.  All subsequent processing will
    proceed successfully.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of the IBM WebSphere Application  *
    *                  Server v7.0 Feature Pack for XML 1.0.       *
    ****************************************************************
    * PROBLEM DESCRIPTION: If an application prepares one or more  *
    *                      XExecutable objects for XSLT            *
    *                      stylesheets, XQuery expressions or      *
    *                      XPath expressions, and then the         *
    *                      application attempts to invoke an       *
    *                      execute method of one or more of those  *
    *                      XExecutable objects on more than one    *
    *                      thread, an                              *
    *                      ArrayIndexOutOfBoundsException might be *
    *                      thrown for one of the threads.  All     *
    *                      subsequent attempts to call execute     *
    *                      methods will succeed.                   *
    *                                                              *
    *                      The same symptoms might occur on the    *
    *                      first invocation of the                 *
    *                      XItemFactory.item(Source) method if     *
    *                      more than one thread in an application  *
    *                      attempts to invoke that method.         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The IBM WebSphere Application Server Feature Pack for
    XML supports input from StreamSource, DOMSource, SAXSource or
    StAXSource objects.  It has several different "data adapters"
    that each support one or more of these forms of input.  When
    a Source object is first supplied on the execute method of an
    XExecutable object or on the item(Source) method of an
    XItemFactory object, the Feature Pack for XML initializes an
    array containing internal descriptions of the data adapters and
    the forms of input Source objects each is able to process.
    The Feature Pack for XML will then select the data adapter from
    the array that is best suited to process the particular Source
    object that was supplied on the XExecutable.execute method or
    the XItemFactory.item(Source) method, and identifies that data
    adapter by way of the index for that data adapter's array entry.
    
    It is possible for two threads to attempt to access that array
    for the first time at nearly the same time, for one thread to
    begin initializing the array and the second thread to begin
    accessing the incompletely initialized array.  In accessing
    the incompletely initialized array, the second thread might
    fail to find a data adapter entry in the array that is
    suitable for processing the Source object.  This is indicated
    with an invalid array index of -1, which triggers an
    ArrayIndexOutOfBoundsException.
    
    In the meanwhile, the first thread completes initializing the
    array of data adapters, and all subsequent attempts to find the
    data adapter best-suited to a particular Source object succeed.
    

Problem conclusion

  • The problem was resolved by adding synchronization to the
    method that initializes the array of data adapters.  When that
    method is invoked on a particular thread, no other thread is
    permitted to enter the method until all entries in the array
    have been completely initialized.  That ensures that no other
    thread accesses the incompletely initialized array, and so
    ensures that every attempt to identify a data adapter that is
    best-suited to a particular Source object succeeds.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 1.0.0.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

    PM15029

  • Reported component name

    XML FEATUREPACK

  • Reported component ID

    5724J0856

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-05-21

  • Closed date

    2010-05-21

  • Last modified date

    2010-05-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

    XML FEATUREPACK

  • Fixed component ID

    5724J0856

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 February 2022