Hi, I've been getting the following error in my Java application with Derby 10.4.2 in embedded mode on Windows XP (Java 1.6.0_20)
XSDG0 : Page Page(1541,Container(0, 2209)) could not be read from disk. Here's what I've found from my application logs: - Thread A gets the following exception: Failed to recover corrupt cache entry - Threads B, C, D etc. successfully query the database - Thread A tries to query the database and gets the XSDG0 error As an aside, the cache error message comes from the JVM itself. I thought it might relate to this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6898702 but it's happening on machines that have only ever run 1.6.0_20 so it may be a previously unreported bug or else something weird in my environment. So, my three questions are: 1. Based on the above, it looks like I can blame the Derby error condition on the fact that Thread A was interrupted. Is this correct? 2. If I know in advance that threads which access the database are going to be prone to interruption, is there any configuration option that I can apply to the connection to mitigate the effect of the interruption? 3. I have naively tried to check for XSDG0 and recreate the connection whenever this occurs. This didn't work, I got the following error when I tried to reconnect: Failed to start database 'c:\myapp\mydb', see the next exception for details. and the next exception was: [08003] : No current connection. which was thrown by the line: conn = DriverManager.getConnection(url, jdbcProps); So, is there something I need to do to clean up the old connection before I can create any new ones? (the current clean procedure consists of trying to commit the old connection which fails and then, closing it which doesn't report any errors). Thanks, -Phil
