By Nirmay26-Oracle on Nov 19, 2008
JavaDB (a.k.a Apache Derby) has a lot tracepoints that could be very useful when debugging complex issues. The best part with them is that these tracepoints are logically grouped together. When enabled, traces related a particular logical section of the code can be obtained. e.g. If you are looking for information around Locks in the JavaDB system, then you could simply enable the LockTrace. The list of such logical components is really huge in the JavaDB system.
The simplest way to define these debug properties is to use the derby.properties file in the derby.system.home directory. To enable debug tracing for Locks and Cache systems in JavaDB, you could add following in the derby.properties file,
Similarly, you can define 'derby.debug.false=XX' for disabling the debug trace for a particular set of components.
The complete list of debug properties can be found here. Try it, but only if you can handle the huge output that it generates most of the times.