db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: (10.1.1.0) Cannot close active connection
Date Wed, 06 Dec 2006 08:31:15 GMT
Xanana Gusmao wrote:
> Hi,
> 
> Version: Derby 10.1.1.0
> 
> I'm getting the error message as described in
> http://issues.apache.org/jira/browse/DERBY-1149 
> when I attempt to close my JDBC
> connection. 

Hello Xanana,

I do not see the cause of your problem, but can you provide some more 
information?

* Can you upgrade to a newer version of Derby, and if so, do you see the 
same exception after upgrading?
   (NOTE: If you hard-upgrade your database, take a backup first in case 
you want to continue using 10.1.1.0)
* How do you obtain the connection?
* In the code path failing, do you do a commit or a rollback?
* If it's a rollback, what exactly does the JdbcUtil.rollback(conn) do?

If you are able (i.e. data and/or code can be published) to provide a 
small reproduction, it would be great :)



regards,
-- 
Kristian

The code:
> 
> 
> Connection conn = .... // obtain Connection
> 
> try
> {
>     .... // processing
>     conn.commit();
> }
> catch( Exception e )
> {
>     JdbcUtil.rollback( conn );    
> }
> finally
> {
>     JdbcUtil.closeResultSet( rsRowLock );
>     JdbcUtil.closeStatement( statementRowLock );
>     JdbcUtil.closeConnection( conn );
> }
> 
> The SQLException is thrown when I try to close the 
> connection (see finally block).
> 
> 
> 


Mime
View raw message