db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject ShutdownException when I haven't asked the database to shut down
Date Fri, 06 Jun 2008 01:19:57 GMT
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?


View raw message