IBM Support

PK63202: JPA PROVIDER ALLOWS PREPARE STATEMENTS TO REMAIN OPEN TOO LONG WHEN USING NATIVE SQL STATEMENT TO UPDATE OR INSERT DATA.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Java Persistence API (JPA) provider allows prepared statements
    to remain open too long when using a native SQL statement to
    update or insert data.
    .
    PK62675 resolves some items involving JPQL queries; this one
    deals with the native part of SQL.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Feature Pack for EJB 3.0.            *
    ****************************************************************
    * PROBLEM DESCRIPTION: If a JPA application with               *
    *                      EntityManagers uses NativeQueries, a    *
    *                      large number of PreparedStatement may   *
    *                      be created and remain open.             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The Java Persistence API (JPA) provider included with the
    WebSphere Application Server Feature Pack for EJB 3.0 opens a
    JDBC PreparedStatement for each NativeQuery that is executed.
    These PreparedStatements will remain open until the
    EntityManager which created them is closed. If an application
    contains a large number of EntityManagers or if its
    EntityManagers remain open for a long time these
    PreparedStatements can consume a great deal of system
    resources on WebSphere Application Server or the database.
    
    When too many resources are consumed on the database because
    of prepared statements remaining open until the underlying
    connection is closed, the following exception may occur:
    
    <openjpa-1.0.1-r420667:593705M,+14141,10430,36730 nonfatal
    gener
    al error> org.apache.openjpa.persistence.PersistenceException:
    ORA-01000: maximum open cursors exceeded
    at
    org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DB
    Dictionary.java:3938)
    at
    org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExcepti
    ons.java:97)
    at
    org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExcepti
    ons.java:83)
    at
    org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExcepti
    ons.java:59)
    at
    org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.exe
    cuteUpdate(SQLStoreQuery.java:255)
    at
    org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:103
    9)
    at
    org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:80
    3)
    at
    org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:
    878)
    at
    org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:
    874)
    at
    org.apache.openjpa.kernel.DelegatingQuery.updateAll(Delegatin
    gQuery.java:565)
    at
    org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryI
    mpl.java:322)
    

Problem conclusion

  • The JPA provider included with the WebSphere Application Server
    Feature Pack for EJB 3.0 was updated so that the
    PreparedStatements used by NativeQueries are closed immediately
    after being executed.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 6.1.0.17.  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

    PK63202

  • 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

    2008-03-24

  • Closed date

    2008-05-15

  • Last modified date

    2008-05-15

  • 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