I'm getting an strange problem with ORA-01453 errors on connections
retrieved from the pool that I'm having difficulty resolving.
There is some info on the web about this, but I can't find any
solutions. It is described in places as a DBCP bug, but I can't be sure.
I _think_ the problem is like this (can't be 100% sure of this):
1. A SQLException happens during a previous operation.
2. This connection gets returned to the pool in a bad state
3. A new operation is started within a transaction (I think this must
use the non-default isolation level) and this "bad" connection is
obtained from the pool.
4. The isolation level tries to be set and you get an error like this:
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
statement of transaction
at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at
oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770)
at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739)
at
oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
at
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:4053)
at
org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:340)
at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setTransactionIsolation(PoolingDataSource.java:332)
at
org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:340)
at
org.springframework.jdbc.datasource.DataSourceUtils.prepareConnectionForTransaction(DataSourceUtils.java:174)
at
org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:210)
Does this make any sense, and is there a solution?
Thanks
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]