On 5/13/2011 3:46 PM, Dag H. Wanvik wrote:

In general, this resource may help you understand how Derby uses locks:


and specifically how to debug deadlocks:


If you feel you understand how Derby takes locks but are seeing Derby
take locks that you feel are not appropriate for your usage and
isolation level, please let us know. If you can provide a lock table
dump, that would be helpful. Please state version of Derby are you
using, too.

If you are using the new release, setting derby.stream.error.extendedDiagSeverityLevel=30000
will print the stack traces of all active threads on deadlock to derby.log, which can help debug both application and possible Derby  issues with Deadlocks.