Indeed, setting derby.language.statementCacheSize=0 appears to work-around the problem (at a fairly high performance cost).
On 06/ 3/10 10:55 AM, Brett Wooldridge wrote:Since the thread dump indicates that there are threads waiting while
> 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.
compiling statements, you may have come across this issue:
https://issues.apache.org/jira/browse/DERBY-4279 (Statement cache deadlock)