commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shifman <mark.shif...@yale.edu>
Subject Re: [dbcp] Error when closing a connection
Date Mon, 12 Nov 2007 18:23:41 GMT

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
gives a discussion of "Random Connection closed Exceptions" which may 
help you.
mas
stephane.demurget@bnpparibas.com wrote:
> Hi all !
>
> I'm using a SharedDataPool and when I try to close the Connection to 
> return it to the pool at some point, I get the following exception:
>
> Exception in thread "pool-7-thread-1" java.lang.IllegalStateException: 
> close() was called on a Connection, but I have no record of the underlying 
> PooledConnection.
>         at 
> org.apache.commons.dbcp.datasources.KeyedCPDSConnectionFactory.connectionClosed(KeyedCPDSConnectionFactory.java:265)
>         at 
> com.sybase.jdbc2.jdbc.SybPooledConnection.notifyListeners(SybPooledConnection.java:225)
>         at 
> com.sybase.jdbc2.jdbc.SybConnectionProxy.close(SybConnectionProxy.java:106)
>         at 
> com.sybase.jdbc2.jdbc.SybPooledConnection.reAssignProxy(SybPooledConnection.java:246)
>         at 
> com.sybase.jdbc2.jdbc.SybPooledConnection.getConnection(SybPooledConnection.java:106)
>         at 
> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:691)
>         at 
> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:653)
>
> I use dbcp-1.2.2 with sybase jConnect 6.05 and I don't understand the 
> problem ... who is the culprit: the driver, dbcp or me?
> If I do not return this connection to the pool, I'm endin up quickly 
> without any connection left :-/
>
> Thanks for helping me.
>
> Best regards,
>
> --St├ęphane
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential. 
> If you receive this message in error, please delete it and 
> immediately notify the sender. Any use not in accord with 
> its purpose, any dissemination or disclosure, either whole 
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message. 
> BNP PARIBAS (and its subsidiaries) shall (will) not 
> therefore be liable for the message if modified. 
>
>                 ---------------------------------------------
>
> Ce message et toutes les pieces jointes (ci-apres le 
> "message") sont etablis a l'intention exclusive de ses 
> destinataires et sont confidentiels. Si vous recevez ce 
> message par erreur, merci de le detruire et d'en avertir 
> immediatement l'expediteur. Toute utilisation de ce 
> message non conforme a sa destination, toute diffusion 
> ou toute publication, totale ou partielle, est interdite, sauf 
> autorisation expresse. L'internet ne permettant pas 
> d'assurer l'integrite de ce message, BNP PARIBAS (et ses
> filiales) decline(nt) toute responsabilite au titre de ce 
> message, dans l'hypothese ou il aurait ete modifie.
>
>
>   


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message