Hi Chas,

Derby raises an exception with the text "Invalid transaction state". However, that message has a different sql state (x0x03) than the one you're seeing. Here's the blurb from the Derby code describing what makes Derby raise this exception:

       // find if there are any held cursors from previous isolation level.
// if yes, then throw an exception that isolation change not allowed until
       // the held cursors are closed.
// I had to move this check outside of transaction idle check because if a // transactions creates held cursors and commits the transaction, then // there still would be held cursors but the transaction state would be idle.
       // In order to check the above mentioned case, the held cursor check
       // shouldn't rely on transaction state.

You might want to look at derby.log to see if there's a stack trace and then forward that stack trace to this list. That could help us push this forward.

Regards,
-Rick

Chas douglass wrote:

I'm using Derby embedded 10.1.1.0 with Hibernate 3.0.5.  I have one thread
running, iterating through a number of transactions.  A second thread starts up,
performs 0 or more transactions, and then ends.  At this point, thread 1 gets:

06:34:05,431  WARN JDBCExceptionReporter:71 - SQL Error: 20000, SQLState: 25000
06:34:05,431 ERROR JDBCExceptionReporter:72 - Invalid transaction state.
org.hibernate.exception.GenericJDBCException: Cannot close connection

I get no errors unless the two threads overlap.

Can anyone provide any insight into what this error is trying to tell me?  Or,
perhaps, suggest what further information would be necessary?

Thanks.

Chas Douglass



Reply via email to