db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3806) java.sql.SQLException: Cannot close a connection while a transaction is still active thrown on Connection.close
Date Wed, 30 Jul 2008 16:53:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618431#action_12618431
] 

Kathey Marsden commented on DERBY-3806:
---------------------------------------

I wonder if you can work around the issue by closing the prepared statements before you commit.
Maybe something is happening when the prepared statements are closed that initiates a transaction.
I''m not sure what that would be however.



> java.sql.SQLException: Cannot close a connection while a transaction is still active
thrown on Connection.close
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3806
>                 URL: https://issues.apache.org/jira/browse/DERBY-3806
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.4.1.3
>         Environment: All operating systems
>            Reporter: Nathan Boy
>
> java.sql.SQLException: Cannot close a connection while a transaction is still active
is being thrown when I am closing a transaction after committing.  This does not happen for
all transactions, and so far I have been unable to figure out why it happens for this particular
one.  The steps the program is taking are as follows:
> 1 - Get a connection to the embedded database
> 2 - Set autocommit to false
> 3 - Execute a number of statements and prepared statements
> 4 - Commit
> 5 - Close all prepared statements
> 6 - Close the connection
> The exception is being thrown when the actual Connection.close() method is invoked.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message