Indeed, setting derby.language.statementCacheSize=0 appears to work-around the problem (at a fairly high performance cost).

It seems this bug (4279) was logged a year ago, any movement on a fix?  The code I'm running isn't exactly rocket science -- select an object via Hibernate, then delete it -- and the resulting SQL to the DB is also trivial.

I've certainly thrown my vote in for the fix.

Anyway, thanks for the heads up, at least I can eliminate this error in the field without a code change.

Brett

On Thu, Jun 3, 2010 at 7:02 PM, Knut Anders Hatlen <Knut.Hatlen@sun.com> wrote:
On 06/ 3/10 10:55 AM, Brett Wooldridge wrote:
> I'm encountering a lock-up in Derby when I put some load (minor) on
> our server.  However, I'm not sure if it's a DB deadlock or if it's a
> thread-lock in Derby's internals.

Since the thread dump indicates that there are threads waiting while
compiling statements, you may have come across this issue:
https://issues.apache.org/jira/browse/DERBY-4279 (Statement cache deadlock)

--
Knut Anders