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 noticed someone else has report this too 
https://github.com/h2database/h2database/issues/4020 

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.


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/e9d0e929-1608-4284-8b65-4483b1b950c5n%40googlegroups.com.

Reply via email to