Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D9F802E002D for ; Mon, 18 Feb 2008 14:52:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 42622-03-5 for ; Mon, 18 Feb 2008 14:52:06 -0400 (AST) Received: from ag-out-0708.google.com (ag-out-0708.google.com [72.14.246.248]) by postgresql.org (Postfix) with ESMTP id 0497A2E0040 for ; Mon, 18 Feb 2008 14:51:53 -0400 (AST) Received: by ag-out-0708.google.com with SMTP id 5so2785313agb.7 for ; Mon, 18 Feb 2008 10:51:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=2ZyOLH5GnivXQaTLzN1CMRebDx8iRPtkpaIFWYZeSxU=; b=uFOD0TzKadLXxdWoC0zwh0E45L98OtsnUfOe7MHuFb+vJoZkThdMfHwg0lGwsljL4rHbeLgoVhX1E6/QVvaQkp6qakPPBr0MP8cbQ48L07LPlkGDrLxex8t1CKNFSWmUQSyJ0D4cpIJdAoOaEm2scE4eKUp0uGB+JcblAI4k+uI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oBH7x+TJitB1GC3A+xiwkwsB06Mlxudjr8LDbNgx9Xw5ezBK2gL2S4HO+xSNV8O36HPwwWmR4mOuSwT+3YcC+lYnYnYkWODkJyx797fs3NYUNv4BXr1a6ir008/nDUaiepFSAPlmH2YSNT8atj/4eLw/LZ5uonLBizVByWgXQUM= Received: by 10.143.16.9 with SMTP id t9mr4589386wfi.164.1203360712792; Mon, 18 Feb 2008 10:51:52 -0800 (PST) Received: by 10.142.179.18 with HTTP; Mon, 18 Feb 2008 10:51:52 -0800 (PST) Message-ID: <3fccaa690802181051r377afa2an33fb9e1a3a7b65ca@mail.gmail.com> Date: Mon, 18 Feb 2008 12:51:52 -0600 From: "Andres Olarte" To: "Paul Tomblin" Subject: Re: Getting "This ResultSet is closed" exceptions Cc: pgsql-jdbc@postgresql.org In-Reply-To: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200802/121 X-Sequence-Number: 18328 Another thread my close the result set if it's using the same statement. Or the thread may close the connection, but i think that would throw another exception. Other wise your code look right On Feb 18, 2008 8:19 AM, Paul Tomblin wrote: > I have some code that works most of the time, but I left it running > overnight and at 3am I got the "This ResultSet is closed" exception on > the "while (rs.next())" line in the following code: > > ResultSet rs = getPerformancesOnVenueStmt.executeQuery(); > > while(rs.next()) > { > Performance performance = parseResultSet(null, null, rs); > if (performance != null) > retList.add(performance); > } > rs.close(); > > The method "parseResultSet" does not close the result set, it just > does the various "rs.get..." calls and creates a Performance object. > > Is it possible that another thread doing a commit on the same > Connection could cause this? > > -- > For my assured failures and derelictions I ask pardon beforehand of my > betters and my equals in my Calling here assembled, praying that in > the hour of my temptations, weakness and weariness, the memory of this > my Obligation and of the company before whom it was entered into, may > return to me to aid, comfort and restrain. > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >