Recovering a Corrupted embedded Apache Derby Database after an error XJ040 (or if you got an error XSDG2)

Apache Derby is a usually a strong database but sometimes it might get corrupted.

This is what worked for me after many embedded  derby databases became corrupted because we finished the free space on the partition (yes, shame on us).

To make things worse, we didn’t always have a recent backup of the db, which just grew the complexity of our problem. Continue reading Recovering a Corrupted embedded Apache Derby Database after an error XJ040 (or if you got an error XSDG2)