community-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael musset <mickamus...@gmail.com>
Subject PoolingDataSource: java.sql.SQLException: Connection is closed
Date Thu, 18 Nov 2010 17:10:02 GMT
Hi,

On my Ubuntu 10.04 Server, I have Tomcat6 running + Postgresql 9.

I use the javax.sql.DataSource like that on my context.xml  file :

<Context>
  <Resource name="jdbc/**********"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100"
    maxIdle="30"
    maxWait="20000"
    removeAbandoned="true"
    removeAbandonedTimeout="1120"
    username="**********"
    password="******"
    logAbandoned="true"
    driverClassName="org.postgresql.Driver"
    url="jdbc:postgresql://localhost/DB?autoReconnect=true"
  />
</Context>


do you have an idea why I got this error ? :

java.sql.SQLException: Connection is closed.
        at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:185)
        at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:317)


When i'm trying to do get a Preparestatement or sometimes on the execute()
command.


My idea is there is too much connection not closed correctly, but i'm sure
that i closed every connection that I open.
And in my context configuration I use :
    removeAbandoned="true"
    removeAbandonedTimeout="1120"

and jdbc:postgresql://localhost/DB?*autoReconnect=true*

Thanks in advance for the help.




-- 
Michael Musset,
Tel: 06 26 06 29 89

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message