Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 31250 invoked from network); 6 Jun 2008 01:19:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2008 01:19:59 -0000 Received: (qmail 11041 invoked by uid 500); 6 Jun 2008 01:20:00 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 11025 invoked by uid 500); 6 Jun 2008 01:20:00 -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 11014 invoked by uid 99); 6 Jun 2008 01:20:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 18:20:00 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [203.217.22.128] (HELO file1.syd.nuix.com.au) (203.217.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 01:19:11 +0000 Received: from host68.syd.nuix.com.au (host68.syd.nuix.com.au [192.168.222.68]) by file1.syd.nuix.com.au (Postfix) with ESMTP id 22BEE4A817C for ; Fri, 6 Jun 2008 11:21:10 +1000 (EST) From: Daniel Noll Organization: Nuix Pty Ltd To: Derby Discussion Subject: ShutdownException when I haven't asked the database to shut down Date: Fri, 6 Jun 2008 11:19:57 +1000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806061119.57580.daniel@nuix.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi all. I'm getting a load of errors like this. They seem to happen at random times; sometimes I see it when creating a statement, sometimes when executing, sometimes when iterating over a result set. Once I even had it happen when creating the connection itself, which is hard to believe. Caused by: java.sql.SQLException: Java exception: ': org.apache.derby.iapi.error.ShutdownException'. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87) at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2125) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1325) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1652) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:277) We are indeed calling shutdown later, but I've checked the time at which things happen and we don't start to shutdown until after this exception. But this is coming from unit tests, and the database for each test is being created into the same directory. If I run the failing test by itself I can't seem to reproduce the problem, but running after other tests it fails around 50% of the time. Is it possible a shutdown() for a previous database at the same location is somehow causing issues for a future database created there? If this is the case, is there some way to *know* when the database shutdown has actually occurred? Daniel