"java.SQL.Exception: [SQL0913]" encountered when reading records using JDBC

Technote (troubleshooting)


Problem(Abstract)

When an application reads a number of records using JDBC from a table and uses a BMP entity bean to delete the records from the table, the error "java.sql.SQLException: [SQL0913] Row or object F55500 in <table> type *FILE in use" occurs.

Cause

The exception indicates that the rows or objects are in use.

Resolving the problem

In the JDBC program that reads a number of records, you need to ensure that all connections are closed so that all resources are released.

If there is no direct way for releasing the connection, restarting the database would remove any open connections but this would be a last measure if there is no other alternative for release the connections.

Instead of using a JDBC program, create a separate session bean to contain the query to the database. The session bean should have a transaction setting of RequiresNew. The SQL statement now runs in a new separate transaction. Once the method has completed running, the transaction is ended and the tables are freed to be used by the BMP entity beans to delete.


Cross Reference information
Segment Product Component Platform Version Edition
Business Integration WebSphere Studio Application Developer Integration Edition EJB Tools Windows, Linux 4.1, 4.1.1, 5.0, 5.0.1 All Editions
Software Development WebSphere Studio Enterprise Developer - Linux/390, Windows 5.0, 5.0.1 All Editions
Software Development Rational Application Developer for WebSphere Software -

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Studio Application Developer
EJB Tools

Software version:

5.0, 5.0.1, 5.1, 5.1.1, 5.1.2

Operating system(s):

Linux, Windows

Reference #:

1163496

Modified date:

2010-10-27

Translate my page

Machine Translation

Content navigation