db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: shutdown problems in unit tests
Date Thu, 13 Sep 2007 08:52:17 GMT
gray.derby@mailnull.com writes:

> Sorry in advance if this is a known issue.  We have some some searches
> and have not found anything that looks relevant.
> -----
> One of my developers is having a lot of problems using Derby behind
> Sequoia in our unit tests.  We are trying to startup and shutdown the
> database in a test and then startup the database in the next test and
> see the following message when we do a 'create table':
>     A lock could not be obtained within the time requested
> Thinking we are having race conditions with the shutdown connection
> string, we've put in sleeps and have waited for the lock to be removed
> but this doesn't seem to help.  Dumping the lock table after the
> failure doesn't show anything.

If you post the contents of the lock table, perhaps someone on the list
could tell what the problem is. The preferred way to dump the lock table
on timeout is to set the properties derby.locks.monitor and
derby.locks.deadlockTrace to true. You should also set
derby.language.logStatementText to true, so that you can find out which
statements obtained the different locks.

Knut Anders

View raw message