IBM Support

PH42031: ECLIPSELINK EXCEPTION FOR CONCURRENT QUERIES WITH CASE/COALESCE EXPRESSIONS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • When executing JPA queries that contain CASE or COALESCE
    expressions, EclipseLink may throw an
    ArrayIndexOutOfBoundsException or a NullPointerException
    in multithreaded environments where queries are being being
    executed simultaneously.
    .
    sample exceptions:
    Exception  EclipseLink-6168  (Eclipse Persistence Services -
    2.6.8.WAS): org.eclipse.persistence.exceptions.QueryException
    Exception Description: Query failed to prepare, unexpected error
    occurred:  java.lang.ArrayIndexOutOfBoundsException: Array index
    out of range: 2 .
    Internal Exception: java.lang.ArrayIndexOutOfBoundsException:
    Array index out of range: 2
    Query: ReportQuery(name="TEST_QUERY" referenceClass=EntityA
    sql="SELECT CASE  WHEN (COUNT(ID) > 0) THEN 1
     ELSE 0 END FROM ENTITY_A WHERE (ID = ?)")
    at org.eclipse.persistence.exceptions.QueryException.prepareFail
    .
    Caused by: java.lang.NullPointerException
    at java.base/java.io.Writer.write(Writer.java:249)
    at org.eclipse.persistence.internal.expressions.ExpressionSQLPri
    at org.eclipse.persistence.expressions.ExpressionOperator.printC
    at org.eclipse.persistence.internal.expressions.ArgumentListFunc
    at org.eclipse.persistence.internal.expressions.FunctionExpressi
    at org.eclipse.persistence.internal.expressions.SQLSelectStateme
    at org.eclipse.persistence.internal.expressions.SQLSelectStateme
    at org.eclipse.persistence.internal.expressions.SQLSelectStateme
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - Java Persistence API - JPA 2.1 &   *
    *                  EclipseLink                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink can throw an                *
    *                      ArrayIndexOutOfBoundsException when     *
    *                      running a CASE select query             *
    *                      concurrently                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When running the a JPA query concurrently, if the query
    contains a CASE select expression, EclipseLink may throw an
    ArrayIndexOutOfBoundsException.
    Example Exception:
    ´´´
    org.eclipse.persistence.exceptions.QueryException Exception
    Description: Query failed to prepare, unexpected error
    occurred:
    [java.lang.ArrayIndexOutOfBoundsException: 4].
    Internal Exception: java.lang.ArrayIndexOutOfBoundsException: 4
    Query: ReportQuery(name="TEST_QUERY" referenceClass=EntityA
    sql="SELECT
    CASE WHEN (COUNT(ID) > 0) THEN 1 ELSE 0 END FROM ENTITY_A
    WHERE (ID = ?)")
    ´´´
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH42031

  • Reported component name

    WEBSPHERE FOR Z

  • Reported component ID

    5655I3500

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-11-10

  • Closed date

    2021-12-20

  • Last modified date

    2021-12-20

  • 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

    WEBSPHERE FOR Z

  • Fixed component ID

    5655I3500

Applicable component levels

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

Document Information

Modified date:
21 December 2021