pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC : this statement has been closed : postgresql 9
4+ messages / 3 participants
[nested] [flat]

* JDBC : this statement has been closed : postgresql 9
@ 2010-11-10 10:20  Michael musset <mickamusset@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Michael musset @ 2010-11-10 10:20 UTC (permalink / raw)
  To: pgsql-jdbc; +Cc: Kris Jurka <books@ejurka.com>

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,

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: JDBC : this statement has been closed : postgresql 9
@ 2010-11-10 10:36  Radosław Smogura <rsmogura@softperience.eu>
  parent: Michael musset <mickamusset@gmail.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Radosław Smogura @ 2010-11-10 10:36 UTC (permalink / raw)
  To: Michael musset <mickamusset@gmail.com>; +Cc: pgsql-jdbc; Kris Jurka <books@ejurka.com>

On Wed, 10 Nov 2010 11:20:14 +0100, Michael musset <mickamusset@gmail.com>
wrote:
> Hi,
> 
> I'm having a troube in my application :
[...]
> 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,

Are you using Hibernate in above? I have similar bug with Hibernate and
XA, try to use PooligDataSource.

-- 
----------
Radosław Smogura
http://www.softperience.eu



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: JDBC : this statement has been closed : postgresql 9
@ 2010-11-18 08:59  Michael musset <mickamusset@gmail.com>
  parent: Radosław Smogura <rsmogura@softperience.eu>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael musset @ 2010-11-18 08:59 UTC (permalink / raw)
  To: Radosław Smogura <rsmogura@softperience.eu>; +Cc: pgsql-jdbc@postgresql.org, Kris Jurka <books@ejurka.com>

Hi,

No, I'm not using Hibernate,

And i'm already using pooling because of :
<Context>
  <Resource name="jdbc/Pool"
    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/DBNexess?autoReconnect=true"
  />
</Context>

my error just  happen once again ........



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)



why is it happenning ? what does it mean ?


On Wed, Nov 10, 2010 at 11:36 AM, Radosław Smogura <rsmogura@softperience.eu
> wrote:

> On Wed, 10 Nov 2010 11:20:14 +0100, Michael musset <mickamusset@gmail.com>
> wrote:
> > Hi,
> >
> > I'm having a troube in my application :
> [...]
> > 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,
>
> Are you using Hibernate in above? I have similar bug with Hibernate and
> XA, try to use PooligDataSource.
>
> --
> ----------
> Radosław Smogura
> http://www.softperience.eu
>



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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: JDBC : this statement has been closed : postgresql 9
@ 2010-11-19 09:55  Thomas Markus <t.markus@proventis.net>
  parent: Michael musset <mickamusset@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Thomas Markus @ 2010-11-19 09:55 UTC (permalink / raw)
  To: pgsql-jdbc

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,
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2010-11-19 09:55 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-10 10:20 JDBC : this statement has been closed : postgresql 9 Michael musset <mickamusset@gmail.com>
2010-11-10 10:36 ` Radosław Smogura <rsmogura@softperience.eu>
2010-11-18 08:59   ` Michael musset <mickamusset@gmail.com>
2010-11-19 09:55 ` Thomas Markus <t.markus@proventis.net>

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