IBM Support

PK74266: EJBTRANSACTIONROLLEDBACKEXCEPTION: WTRN0074E:EXCEPTION CAUGHT FROM BEFORE_COMPLETION SYNCHRONIZATION

Fixes are available

7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for IBM i
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for AIX
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for HP-UX
7.0.0.3: Java SDK 1.6 SR4 Cumulative Fix for WebSphere Application Server
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Solaris
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Linux
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for AIX
7.0.0.3: WebSphere Application Server V7.0 Fix Pack 3 for Windows
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for IBM i
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Windows
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for HP-UX
7.0.0.5: Java SDK 1.6 SR5 Cumulative Fix for WebSphere Application Server
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Solaris
7.0.0.5: WebSphere Application Server V7.0 Fix Pack 5 for Linux
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for IBM i
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for AIX
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Windows
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for HP-UX
7.0.0.7: Java SDK 1.6 SR6 Cumulative Fix for WebSphere Application Server
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Solaris
7.0.0.7: WebSphere Application Server V7.0 Fix Pack 7 for Linux
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for IBM i
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Windows
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for AIX
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for HP-UX
7.0.0.9: Java SDK 1.6 SR7 Cumulative Fix for WebSphere Application Server
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Solaris
7.0.0.9: WebSphere Application Server V7.0 Fix Pack 9 for Linux
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for IBM i
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Windows
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for HP-UX
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for AIX
7.0.0.11: Java SDK 1.6 SR7 Cumulative Fix for WebSphere Application Server
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Solaris
7.0.0.11: WebSphere Application Server V7.0 Fix Pack 11 for Linux
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for AIX
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for HP-UX
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for IBM i
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Linux
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Solaris
7.0.0.13: WebSphere Application Server V7.0 Fix Pack 13 for Windows
7.0.0.13: Java SDK 1.6 SR8FP1 Cumulative Fix for WebSphere Application Server
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for AIX
7.0.0.15: Java SDK 1.6 SR9 Cumulative Fix for WebSphere Application Server
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for HP-UX
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for IBM i
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Linux
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Solaris
7.0.0.15: WebSphere Application Server V7.0 Fix Pack 15 for Windows
7.0.0.17: WebSphere Application Server V7.0 Fix Pack 17
7.0.0.17: Java SDK 1.6 SR9 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.19: WebSphere Application Server V7.0 Fix Pack 19
7.0.0.21: WebSphere Application Server V7.0 Fix Pack 21
7.0.0.23: WebSphere Application Server V7.0 Fix Pack 23
7.0.0.25: WebSphere Application Server V7.0 Fix Pack 25
7.0.0.27: WebSphere Application Server V7.0 Fix Pack 27
7.0.0.29: WebSphere Application Server V7.0 Fix Pack 29
7.0.0.31: WebSphere Application Server V7.0 Fix Pack 31
7.0.0.27: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.33: WebSphere Application Server V7.0 Fix Pack 33
7.0.0.35: WebSphere Application Server V7.0 Fix Pack 35
7.0.0.19: Java SDK 1.6 SR9 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.21: Java SDK 1.6 SR9 FP2 Cumulative Fix for WebSphere
7.0.0.23: Java SDK 1.6 SR10 FP1 Cumulative Fix for WebSphere
7.0.0.25: Java SDK 1.6 SR11 Cumulative Fix for WebSphere Application Server
7.0.0.27: Java SDK 1.6 SR12 Cumulative Fix for WebSphere Application Server
7.0.0.29: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.45: Java SDK 1.6 SR16 FP60 Cumulative Fix for WebSphere Application Server
7.0.0.31: Java SDK 1.6 SR15 Cumulative Fix for WebSphere Application Server
7.0.0.35: Java SDK 1.6 SR16 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.37: Java SDK 1.6 SR16 FP3 Cumulative Fix for WebSphere Application Server
7.0.0.39: Java SDK 1.6 SR16 FP7 Cumulative Fix for WebSphere Application Server
7.0.0.41: Java SDK 1.6 SR16 FP20 Cumulative Fix for WebSphere Application Server
7.0.0.43: Java SDK 1.6 SR16 FP41 Cumulative Fix for WebSphere Application Server

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • EJBTransactionRolledbackException
    When this happens, the application tries to persist BatchJob
    into database (BatchJobDAO.addBatchJob method), BatchJob has
    OneToMany relationship to BatchTask, and BatchTask has OneToMany
    relationship to BatchTaskParameter. When persisting BatchJob,
    we are expecting the system will persist BatchJob first, then
    BatchTask and then BatchTaskParameter. But it seems the system
    tries to persist BatchTaskParameter first which caused a
    foreign violation.
    ?10/6/08 10:53:42:508 EDT? 0000002b RegisteredSyn E   WTRN0074E:
    Exception caught from before_completion synchronization
    operation:
    <openjpa-1.2.1-SNAPSHOT-r422266:686069 fatal general error>
    org.apache.openjpa.persistence.PersistenceException: The
    transaction has been rolled back.  See the nested exceptions
    for details on the errors that occurred.
    at
    org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerIm
    pl.java:2163)
    at
    org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
    at
    org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1
    908)
    ...
    Caused by: <openjpa-1.2.1-SNAPSHOT-r422266:686069 nonfatal
    general error>
    org.apache.openjpa.persistence.PersistenceException:
    ORA-02291:
    integrity constraint (NGAPP.FK_BATCH_TASK_PARAMETER_TASK)
    violated -
    parent key not found   {prepstmnt 1670275982 INSERT INTO
    BATCH_TASK_PARAMETER (OID, NAME,
    PARAMETER_INDEX, TASK_INDEX, VALUE, BATCH_TASK_OID) VALUES (?,
    ?, ?, ?,
    ?, ?) ?params=(String) 98899, (String) inputFile, (int) 0,
    (int) 0,
    (String) PR2ZZ.DCS, (String) 98898?} ?code=2291, state=23000?
    FailedObject: ?????????
    at
    org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.ja
    va:4231)
    ...
    Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException:
    ORA-02291:
    integrity constraint (NGAPP.FK_BATCH_TASK_PARAMETER_TASK)
    violated -
    parent key not found
    {prepstmnt 1670275982 INSERT INTO BATCH_TASK_PARAMETER (OID,
    NAME,
    PARAMETER_INDEX, TASK_INDEX, VALUE, BATCH_TASK_OID) VALUES (?,
    ?, ?, ?,
    ?, ?) ?params=(String) 98899, (String) inputFile, (int) 0,
    (int) 0,
    (String) PR2ZZ.DCS, (String) 98898?} ?code=2291, state=23000?
    org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(Logg
    ingConne
    ctionDecorator.java:192)
    at
    org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$70
    0(Loggin
    gConnectionDecorator.java:57)
    ...
    NestedThrowables:
    <openjpa-1.2.1-SNAPSHOT-r422266:686069 nonfatal general error>
    org.apache.openjpa.persistence.PersistenceException: ORA-02291:
    integrity constraint (NGAPP.FK_BATCH_TASK_PARAMETER_TASK)
    violated -
    parent key not found
    FailedObject: prepstmnt 1195460417 INSERT INTO
    BATCH_TASK_PARAMETER
    (OID, NAME, PARAMETER_INDEX, TASK_INDEX, VALUE, BATCH_TASK_OID)
    VALUES
    (?, ?, ?, ?, ?, ?)
    ?org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedS
    tatement  at
    org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.jav
    a:4231)
    ...
    Caused by: java.sql.SQLException: ORA-02291: integrity
    constraint
    (NGAPP.FK_BATCH_TASK_PARAMETER_TASK) violated - parent key not
    found
    .
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of WebSphere Application Server   *
    *                  V7.0 Java Persistence API (JPA) Entities.   *
    ****************************************************************
    * PROBLEM DESCRIPTION: JPA Entities are not inserted into      *
    *                      the database in the proper order.       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If the JPA Entities are inserted into the database as the
    result of a cascade (for example, persist A cascades to B
    which cascades to C) they may not be inserted into the
    database in the same order (insert A, insert B, insert C).
    Instead the order may be C, A, B.
    
    This can cause SQLExceptions if there are foreign key
    relationships in the database.
    

Problem conclusion

  • There are a few options to resolve this problem :
    
    1. Add the following property to persistence.xml :
    <property name="openjpa.jdbc.SchemaFactory
    "value="native(ForeignKeys=true) "/>
    This property configures OpenJPA to read in the column
    definitions from the database. If there are foreignKey
    constraints in the database the SQL will be ordered
    appropriately.
    
    2. Add org.apache.openjpa.persistence.jdbc.ForeignKey
    annotations to fields in the entity class which have foreign
    key constraints. OpenJPA will properly order the sql once it
    "knows" about the ForeignKey annotations.
    
    In addition to using any of these approaches we have updated
    the OpenJPA code so that the order of inserts, updates and
    deletes are preserved, after any known foreign keys are
    resolved. The potential for foreign key issues still exists
    but the likelihood is greatly reduced.
    
    The fix for this APAR is currently targeted for inclusion in
    fixpack 7.0.0.5.  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

    PK74266

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-10-22

  • Closed date

    2008-12-12

  • Last modified date

    2009-01-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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
23 October 2021