IBM Support

PI75607: javax.persistence.PessimisticLockException when javax.persistence.lock.timeout set to 0

Fixes are available

16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
9.0.0.3: WebSphere Application Server traditional V9.0 Fix Pack 3
9.0.0.4: WebSphere Application Server traditional V9.0 Fix Pack 4
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
9.0.0.7: WebSphere Application Server traditional V9.0 Fix Pack 7
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
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
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
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
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
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
9.0.5.4: WebSphere Application Server traditional Version 9.0.5 Fix Pack 4
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
9.0.5.5: WebSphere Application Server traditional Version 9.0.5 Fix Pack 5
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12
9.0.5.6: WebSphere Application Server traditional Version 9.0.5 Fix Pack 6

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • [3/29/16 12:05:31:070 EDT] 00000111 SystemErr R
    javax.persistence.PessimisticLockException: Exception
    [EclipseLink-4002] (Eclipse Persistence Services -
    2.6.2.WAS-v20160317-fd96b8f):
    org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception:
    com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error:
    SQLCODE=-104, SQLSTATE=42601, SQLERRMC=NOWAIT;ND KEEP UPDATE
    LOCKS;END-OF-STATEMENT, DRIVER=4.19.26
    Error Code: -104
    Call: SELECT t0.NO_D_ID, t0.NO_O_ID, t0.NO_W_ID, t0.VERSION
    FROM NEWORDERS t0 WHERE ((t0.NO_O_ID IN (SELECT
    MIN(t1.NO_O_ID) FROM NEWORDERS t1 WHERE ((t1.NO_W_ID = ?)
    AND (t1.NO_D_ID = ?))) AND (t0.NO_W_ID = ?)) AND (t0.NO_D_ID
    = ?)) FOR READ ONLY WITH RS USE AND KEEP UPDATE LOCKS NOWAIT
    bind => [4 parameters bound]
    Query: ReadAllQuery(name="findMinNewOrder"
    referenceClass=NewOrderJPA sql="SELECT t0.NO_D_ID,
    t0.NO_O_ID, t0.NO_W_ID, t0.VERSION FROM NEWORDERS t0 WHERE
    ((t0.NO_O_ID IN (SELECT MIN(t1.NO_O_ID) FROM NEWORDERS t1
    WHERE ((t1.NO_W_ID = ?) AND (t1.NO_D_ID = ?))) AND
    (t0.NO_W_ID = ?)) AND (t0.NO_D_ID = ?)) FOR READ ONLY WITH
    RS USE AND KEEP UPDATE LOCKS NOWAIT")
    
     
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Java Persistence API (JPA  *
    *                  2.1) using DB2                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: Setting javax.persistence.lock.timeout  *
    *                      to 0 causes EclipseLink JPA 2.1         *
    *                      provider to throw a                     *
    *                      javax.persistence.PessimisticLockExcept *
    *                      ion                                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Setting the property to 0 caused EclipseLink to add a NOWAIT to
    the SQL. DB2 does not support NOWAIT and therefore throws an
    exception.
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PI75607

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-01-27

  • Closed date

    2017-02-02

  • Last modified date

    2017-02-02

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • RCD0 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
19 October 2021