IBM Support

PM63909: QUERY RETURNS AN OPTIMISTICLOCKEXCEPTION WHEN OPENJPA.OPTIMISTIC IS SET TO FALSE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Observing unexpected behaviour regarding locking
    
    pessimistic behaviour (WeakestLockAtLoad) after migrating from
    EJB 2.1 to EJB 3.0.
    
    ERROR:
    Caused by: <openjpa-1.0.4-SNAPSHOT-r420667:955062 nonfatal
    general
    error> org.apache.openjpa.persistence.PersistenceException:
    DB2 SQL Error: SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68,
    DRIVER=3.59.8 1
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V6.1.0 Feature Pack for Enterprise   *
    *                  JavaBeans 3.0 who make use of               *
    *                  openjpa.Optimistic setting.                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: Query returns an                        *
    *                      OptimisticLockException                 *
    *                      when openjpa.Optimistic is set to       *
    *                      false.                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When using the following lock settings:
    <property name="openjpa.jdbc.TransactionIsolation"
    value="repeatable-read"/>
    <property name="openjpa.Optimistic" value="false"/>
    there exists the potential for a
    javax.persistence.OptimisticLockException to occur when
    running a JPA query.
    

Problem conclusion

  • Code has been added to OpenJPA to ensure that an
    OptimisticLockExceptions doesn't occur, unless neccessary, when
    openjpa.Optimistic is set to a value of false.
    
    The fix for this APAR is currently targeted for inclusion
    in Enterprise JavaBeans 3.0 Feature Pack Fix Pack 45
    (6.1.0.45) of WebSphere Application Server versions
    6.1.0.
    
    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

    PM63909

  • Reported component name

    WAS EJB3 FEATUR

  • Reported component ID

    5724J0851

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-05-04

  • Closed date

    2012-05-25

  • Last modified date

    2012-08-14

  • 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

    WAS EJB3 FEATUR

  • Fixed component ID

    5724J0851

Applicable component levels

  • R610 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 February 2022