db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff hendrey <geoff_hend...@yahoo.com>
Subject Invalid transaction state - held cursor requires same isolation level
Date Sat, 06 Oct 2007 00:22:40 GMT
Here are 3 lines from my code:

Connection c = ConnectionManager.getConnection(req);

The *second* time this block executes, I get this exception from the attempt to setTransactionIsolation:

java.sql.SQLException: Invalid transaction state - held cursor requires same isolation level
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
        at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
        at org.apache.derby.client.am.Connection.setTransactionIsolation(Unknown Source)

ANyone have any ideas what this message might mean? My guess is that a result set is open
and a cursor in that result set is somehow not getting closed after the first pass. But I'm
hard pressed to see where in my code this could be happening since I close all my connections
in finally blocks.

View raw message