IBM Support

PI80863: ISSUE WITH THE WAY OPENJPA CACHES AND REUSES QUERY PARAMETERS FOR BETWEEN EXPRESSIONS WHEN OPENJPA'SQUERYCACHE PROPERTY ENBLED

Fixes are available

9.0.0.5: WebSphere Application Server traditional V9.0 Fix Pack 5
9.0.0.6: WebSphere Application Server traditional V9.0 Fix Pack 6
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
9.0.0.7: WebSphere Application Server traditional V9.0 Fix Pack 7
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
9.0.0.8: WebSphere Application Server traditional V9.0 Fix Pack 8
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
9.0.0.9: WebSphere Application Server traditional V9.0 Fix Pack 9
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
9.0.0.10: WebSphere Application Server traditional V9.0 Fix Pack 10
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
9.0.0.11: WebSphere Application Server traditional V9.0 Fix Pack 11
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
9.0.5.0: WebSphere Application Server traditional Version 9.0.5 Refresh Pack
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
9.0.5.1: WebSphere Application Server traditional Version 9.0.5 Fix Pack 1
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
9.0.5.2: WebSphere Application Server traditional Version 9.0.5 Fix Pack 2
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
9.0.5.3: WebSphere Application Server traditional Version 9.0.5 Fix Pack 3
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When OpenJPA's QueryCache property openjpa.jdbc.QuerySQLCache is
    enabled, then cached Timestamp parameter is not being updated
    for the TO_DATE for BETWEEN expressions which results wrong set
    of data is being retrieved.
    

Local fix

  • Disable QueryCahce by setting the below property:
    
    <property name="openjpa.jdbc.QuerySQLCache" value="false"/>
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server using the OpenJPA JPA provider       *
    ****************************************************************
    * PROBLEM DESCRIPTION: OpenJPA's QueryCache fails to           *
    *                      work for Queries that contain a         *
    *                      BETWEEN expression. Parameters passed   *
    *                      to the queries will persist across      *
    *                      multiple executions, leading to         *
    *                      unexpected queries.                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    OpenJPA's QueryCache fails to
    work for Queries that contain a
    BETWEEN expression. Parameters passed to the
    query in application code will
    persist across execution, resulting
    in incorrect queries from what is
    expected.
    

Problem conclusion

  • The fix for this APAR changes the OpenJPA implementation and
    involves and update to the OpenJPA thirdparty bundle. See
    https://issues.apache.org/jira/browse/OPENJPA-2698
    
    The fix for this APAR is currently targeted for inclusion in
    Service Level (Fix Pack) 9.0.0.5 of WebSphere Application
    Server verion 9.0, Service Level (Fix Pack) 8.5.5.13 of
    WebSphere Application Server version 8.5.5, and in fix pack
    17.0.0.3 for WebSphere Application Server Liberty. Please
    refer to the Recommended Updates page for delivery
    information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • A temporary workaround can be to set the following
    peristence property in order to turn off query caching:
    
    <property name="openjpa.QueryCache" value="false"/>
    

Comments

APAR Information

  • APAR number

    PI80863

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-05-01

  • Closed date

    2017-07-19

  • Last modified date

    2017-10-03

  • 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 APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R850 PSY

       UP

  • R900 PSY

       UP

[{"Business Unit":{"code":"BU029","label":"Software"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}]}]

Document Information

Modified date:
26 May 2020