pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Markus <t.markus@proventis.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC : this statement has been closed : postgresql 9
Date: Fri, 19 Nov 2010 10:55:36 +0100
Message-ID: <4CE64998.1080305@proventis.net> (raw)
In-Reply-To: <AANLkTi=SrzUqJxuy4SnXNTyWTcXF2b_QJM733z7juDu-@mail.gmail.com>
References: <AANLkTi=SrzUqJxuy4SnXNTyWTcXF2b_QJM733z7juDu-@mail.gmail.com>

it happens when you access a preparedstatement and the associted 
connection is closed. maybe your application was busy/idle for more than 
120 seconds. see removeAbandonedTimeout="120"

regards
Thomas


Am 10.11.2010 11:20, schrieb Michael musset:
> Hi,
>
> I'm having a troube in my application :
>
> org.postgresql.util.PSQLException: This statement has been closed.
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement.checkClosed(AbstractJdbc2Statement.java:2508)
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement.getMaxRows(AbstractJdbc2Statement.java:595)
>          at
> org.postgresql.jdbc4.Jdbc4Statement.createResultSet(Jdbc4Statement.java:36)
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler.handleResultRows(AbstractJdbc2Statement.java:211)
>          at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>          at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
>          at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
>          at
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
>          at
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
>
>
> It's happen when I execute my PreparedStatement .
>
>
> Normally it's work well, but in my error log, i found this ....
>
> I'm on ubuntu 10.04 server with a tomcat running.
> i Have multi thread running, but i'm sure that other thread can't interfer
> with that.
>
> And i'm using this :
>
> <Context>
>    <Resource name="jdbc/NexessPool"
>      auth="Container"
>      type="javax.sql.DataSource"
>      maxActive="100"
>      maxIdle="30"
>      maxWait="20000"
>      removeAbandoned="true"
>      removeAbandonedTimeout="120"
>      username="**********"
>      password="*********"
>      driverClassName="org.postgresql.Driver"
>      url="jdbc:postgresql://localhost/database"
>    />
> </Context>
>
>
>
> which JDBC i'm using ? this one :
>
> http://ejurka.com/pgsql/jars/xml/
>
> from Kris Jurka ( thx to him )
>
>
> I don't understand why a preparestatement have been close ?
>
>
>
> thx for your help,
>




view thread (4+ messages)

Message-ID: <4CE64998.1080305@proventis.net>
Permalink:  ../4CE64998.1080305@proventis.net/
Also on:    postgresql.org/message-id/4CE64998.1080305@proventis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: t.markus@proventis.net
  Subject: Re: JDBC : this statement has been closed : postgresql 9
  In-Reply-To: <4CE64998.1080305@proventis.net>
  References: <AANLkTi=SrzUqJxuy4SnXNTyWTcXF2b_QJM733z7juDu-@mail.gmail.com> <4CE64998.1080305@proventis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox