Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6749A1337B5B for ; Fri, 19 Nov 2010 05:55:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 78101-10 for ; Fri, 19 Nov 2010 09:55:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from intern.proventis.net (intern.proventis.net [85.182.161.50]) by mail.postgresql.org (Postfix) with ESMTP id 73F9C1337B66 for ; Fri, 19 Nov 2010 05:55:24 -0400 (AST) Received: from server1.proventis.net (unknown [192.168.22.250]) by intern.proventis.net (Postfix) with ESMTP id 9733423DE2 for ; Fri, 19 Nov 2010 10:55:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by server1.proventis.net (Postfix) with ESMTP id 960E8C44291 for ; Fri, 19 Nov 2010 10:55:03 +0100 (CET) Received: from server1.proventis.net ([127.0.0.1]) by localhost (server1.proventis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26100-06 for ; Fri, 19 Nov 2010 10:55:03 +0100 (CET) Received: from [192.168.22.130] (tmarkus.proventis.net [192.168.22.130]) by server1.proventis.net (Postfix) with ESMTP id 2A48FC440C6 for ; Fri, 19 Nov 2010 10:55:03 +0100 (CET) Message-ID: <4CE64998.1080305@proventis.net> Date: Fri, 19 Nov 2010 10:55:36 +0100 From: Thomas Markus Organization: proventis GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.12) Gecko/20101026 SUSE/3.1.6 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.6 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: JDBC : this statement has been closed : postgresql 9 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at proventis.net X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/49 X-Sequence-Number: 21170 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 : > > > 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" > /> > > > > > 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, >