PoolingDataSource: java.sql.SQLException: Connection is closed - Mailing list pgsql-jdbc

From Michael musset
Subject PoolingDataSource: java.sql.SQLException: Connection is closed
Date
Msg-id AANLkTimB8AogvKzD04zPNuwFq6QPTGuG+waeBWp0Tt+Z@mail.gmail.com
Whole thread Raw
Responses Re: PoolingDataSource: java.sql.SQLException: Connection is closed
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Michael musset
Date:
Subject: Re: JDBC : this statement has been closed : postgresql 9
Next
From: Sean Owen
Date:
Subject: Re: PoolingDataSource: java.sql.SQLException: Connection is closed