Hi,
I am trying to repair a corrupt database, but the recover runs in an error:
Caused by: java.lang.NullPointerException
org.h2.mvstore.DataUtils.parseMap(DataUtils.java:804)
org.h2.mvstore.Chunk.<init>(Chunk.java:171)
org.h2.mvstore.SFChunk.<init>(SFChunk.java:26)
org.h2.mvstore.MVStoreTool.dump(MVStoreTool.java:151)
org.h2.tools.Recover.process(Recover.java:242)
org.h2.tools.Recover.execute(Recover.java:226)
I have looked into the MvStoreTool.java and changed the try .. catch arround the line 151 to catch all exceptions:
try {
c = new SFChunk(Chunk.readChunkHeader(buffer));
//} catch (MVStoreException e) {
} catch (Exception e) {
pos += blockSize;
continue;
}
Now it can run further and the recover produces an h2.sql dump.
Is this a good fix for this issue?
I was also wondering where wondering where the mv.txt dump file is used for.
I only need the h2.sql dump to recover the database.