Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 68720 invoked from network); 23 Nov 2005 22:26:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Nov 2005 22:26:34 -0000 Received: (qmail 66774 invoked by uid 500); 23 Nov 2005 22:26:32 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 66750 invoked by uid 500); 23 Nov 2005 22:26:32 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 66738 invoked by uid 99); 23 Nov 2005 22:26:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 14:26:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [210.50.55.251] (HELO file1.syd.nuix.com.au) (210.50.55.251) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2005 14:27:58 -0800 Received: from [192.168.222.102] (demo1.syd.nuix.com.au [192.168.222.102]) by file1.syd.nuix.com.au (Postfix) with ESMTP id 42BF3B7124 for ; Thu, 24 Nov 2005 09:26:03 +1100 (EST) Message-ID: <4384EE0B.7040006@nuix.com.au> Date: Thu, 24 Nov 2005 09:32:43 +1100 From: Daniel Noll Organization: NUIX Pty Limited User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Users Mailing List Subject: Strange error: "ResultSet not open. Operation 'next' not permitted." Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Got this exception while two threads were rapidly querying a single database: Caused by: SQL Exception: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF. at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:195) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:381) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1296) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:88) at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java:3715) at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:385) at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java:299) ... The code we called it from was checking for existence of a row, like this: PreparedStatement ps = conn.prepareStatement("SELECT ..."); ps.setLong(1, id); ResultSet rs = ps.executeQuery; try { return rs.next(); <-- This line did it. } finally { rs.close(); } Autocommit is indeed off, but regardless of that, we're not actually updating this database at any point in time, just reading data out of it to put it in another. Daniel -- Daniel Noll NUIX Pty Ltd Level 8, 143 York Street, Sydney 2000 Phone: (02) 9283 9010 Fax: (02) 9283 9020 This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this message or attachment is strictly prohibited.