PoolingDataSource: java.sql.SQLException: Connection is closed

From: Michael musset <mickamusset(at)gmail(dot)com>
To: dev(at)community(dot)apache(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: PoolingDataSource: java.sql.SQLException: Connection is closed
Date: 2010-11-18 17:10:02
Message-ID: AANLkTimB8AogvKzD04zPNuwFq6QPTGuG+waeBWp0Tt+Z@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sean Owen 2010-11-18 17:13:32 Re: PoolingDataSource: java.sql.SQLException: Connection is closed
Previous Message Michael musset 2010-11-18 08:59:09 Re: JDBC : this statement has been closed : postgresql 9