Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2D6388ECFC1 for ; Tue, 6 Dec 2011 02:16:10 -0400 (AST) Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXoK1-0006RJ-0y for pgsql-jdbc@postgresql.org; Tue, 06 Dec 2011 06:16:10 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id pB66Fn903507 for ; Mon, 5 Dec 2011 22:15:49 -0800 Message-ID: <4EDDB315.4050006@hogranch.com> Date: Mon, 05 Dec 2011 22:15:49 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: This connection has been closed References: <4EDDB1B8.70203@magwas.rulez.org> In-Reply-To: <4EDDB1B8.70203@magwas.rulez.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/20 X-Sequence-Number: 22474 On 12/05/11 10:10 PM, Magos=C3=A1nyi =C3=81rp=C3=A1d wrote: > I am using a cdo server (org.eclipse.emf.cdo) which uses hibernate=20 > which uses the postgresql jdbc driver. (9.0.0.801) > Between two transactions the tcp connection between the cdo server and = > postgresql went down (my laptop hibernated). > I got an exception with this cause: > > Caused by: org.postgresql.util.PSQLException: This connection has been = > closed. > at=20 > org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2C= onnection.java:714) > at=20 > org.postgresql.jdbc2.AbstractJdbc2Connection.getAutoCommit(AbstractJdbc= 2Connection.java:680) > at=20 > org.hibernate.connection.DriverManagerConnectionProvider.getConnection(= DriverManagerConnectionProvider.java:127) > at=20 > org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.j= ava:446) > > This might be related to this issue: > https://forum.hibernate.org/viewtopic.php?f=3D1&t=3D957369 > > Do we have a hibernate, a postgresql or a CDO issue here?=20 offhand, I'd say you need to catch that exception, reinitialize the=20 connection, and then recover. --=20 john r pierce N 37, W 122 santa cruz ca mid-left coast