Closed GoogleCodeExporter closed 9 years ago
You could use the Recover tool.
However, in theory the database should not get into this state. Could you send
it to me (via email)?
Original comment by thomas.t...@gmail.com
on 4 Oct 2014 at 8:54
This database is currently 8 gigs, I'm not sure I have permission to hand it
out though. I've made a copy of the file so that I can do further testing if
required, but this copy of the database is no longer needed (reinserted the
data with a new / empty database). I would like to help fix this bug though so
that it doesn't continue to show up in the future.
Is there any code or diagnositc utilities I can run on the file and then send
that data to you?
Original comment by localde...@gmail.com
on 7 Oct 2014 at 3:16
You could check if there is a <databaseName>.lock.db file (it's a text file),
and verify if there are any exceptions or messages. Also, you could run the
Recover tool and send me the <databaseName>.mv.txt (compressed)
Original comment by thomas.t...@gmail.com
on 22 Oct 2014 at 6:48
I attempted to run the recovery tool on the corrupted database, it threw the
following stacktrace:
Exception in thread "main" java.lang.IllegalArgumentException
at java.nio.Buffer.position(Unknown Source)
at org.h2.mvstore.MVStoreTool.dump(MVStoreTool.java:136)
at org.h2.tools.Recover.process(Recover.java:327)
at org.h2.tools.Recover.runTool(Recover.java:192)
at org.h2.tools.Recover.main(Recover.java:155)
This is using h2-1.4.181 (same version of h2 that was used initially to create
/ serve the database that became corrupted).
It did manage to fill a 848 meg txt file with data in it before it threw the
exception, but I'm not able to send the whole file. I can send the last portion
(possibly) if that helps.
Original comment by localde...@gmail.com
on 11 Nov 2014 at 8:11
The IllegalArgumentException is now fixed in the trunk. But I'm afraid I can't
help in another way currently. Could you download the H2 trunk yourself,
compile it, and then run MVStoreTool.dump again?
Original comment by thomas.t...@gmail.com
on 14 Nov 2014 at 8:51
Should be fixed in todays release. Could you try again with todays release?
Original comment by thomas.t...@gmail.com
on 13 Dec 2014 at 7:16
Hi, I have an corrupted database that shows the same error. What can I do to
recoer it?
Original comment by danielba...@gmail.com
on 13 Jan 2015 at 7:39
You could use the Recover tool to retrieve the data.
Original comment by thomas.t...@gmail.com
on 14 Jan 2015 at 6:49
Original comment by thomas.t...@gmail.com
on 14 Jan 2015 at 6:50
[deleted comment]
Yes thomas, that was what I thought.. but this exception is shown when I run
the Recover tool.
daniel.bathke@desktop:~/Downloads/database$ java -cp ../h2*.jar
org.h2.tools.Recover -trace -transactionLog -db "xxxxxx"
Created file: .......mv.txt
Created file: .......h2.sql
Error: java.lang.IllegalStateException: Reading from cache:nio:........mv.db
failed; file length 14348288 read length 192 at 14355028 [1.4.184/1]
java.lang.IllegalStateException: Reading from cache:nio:.........mv.db failed;
file length 14348288 read length 192 at 14355028 [1.4.184/1]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:774)
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:443)
at org.h2.mvstore.FileStore.readFully(FileStore.java:98)
at org.h2.mvstore.Page.read(Page.java:189)
at org.h2.mvstore.MVStore.readPage(MVStore.java:1830)
at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
at org.h2.mvstore.MVMap.setRootPos(MVMap.java:746)
at org.h2.mvstore.MVStore.openMap(MVStore.java:475)
at org.h2.mvstore.db.TransactionStore.openMap(TransactionStore.java:373)
at org.h2.mvstore.db.TransactionStore$Transaction.openMap(TransactionStore.java:726)
at org.h2.tools.Recover.dumpMVStoreFile(Recover.java:609)
at org.h2.tools.Recover.process(Recover.java:331)
at org.h2.tools.Recover.runTool(Recover.java:192)
at org.h2.tools.Recover.main(Recover.java:155)
Caused by: java.io.EOFException
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:431)
... 12 more
Original comment by danielba...@gmail.com
on 14 Jan 2015 at 10:21
I see. I'm afraid that it is not possible to retrieve the data with a
reasonable amount of work then.
Original comment by thomas.t...@gmail.com
on 15 Jan 2015 at 7:06
Should be fixed with version 1.4.185
Original comment by thomas.t...@gmail.com
on 16 Jan 2015 at 5:16
Can I get the trunk code and test it?
Original comment by danielba...@gmail.com
on 16 Jan 2015 at 5:21
You can do that (see the "source" tab), but you can also test with the latest
official download.
Original comment by thomas.t...@gmail.com
on 17 Jan 2015 at 1:55
Ok. Will do that now.
Original comment by danielba...@gmail.com
on 19 Jan 2015 at 11:43
Same error dude. :/
Error: java.lang.IllegalStateException: Reading from
cache:nio:xxxxxxxxxxxxxx.mv.db failed; file length 14348288 read length 192 at
14355028 [1.4.185/1]
java.lang.IllegalStateException: Reading from cache:nio:xxxxxxxxxxxxx.mv.db
failed; file length 14348288 read length 192 at 14355028 [1.4.185/1]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:443)
at org.h2.mvstore.FileStore.readFully(FileStore.java:98)
at org.h2.mvstore.Page.read(Page.java:189)
at org.h2.mvstore.MVStore.readPage(MVStore.java:1830)
at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
at org.h2.mvstore.MVMap.setRootPos(MVMap.java:746)
at org.h2.mvstore.MVStore.openMap(MVStore.java:475)
at org.h2.mvstore.db.TransactionStore.openMap(TransactionStore.java:373)
at org.h2.mvstore.db.TransactionStore$Transaction.openMap(TransactionStore.java:726)
at org.h2.tools.Recover.dumpMVStoreFile(Recover.java:609)
at org.h2.tools.Recover.process(Recover.java:331)
at org.h2.tools.Recover.runTool(Recover.java:192)
at org.h2.tools.Recover.main(Recover.java:155)
Caused by: java.io.EOFException
at org.h2.mvstore.DataUtils.readFully(DataUtils.java:431)
... 12 more
Original comment by danielba...@gmail.com
on 19 Jan 2015 at 12:16
This is an old file that is already corrupt, right? The new version can not fix
that, it can only prevent that you get new corruptions (with a new database).
Original comment by thomas.t...@gmail.com
on 19 Jan 2015 at 12:29
Original issue reported on code.google.com by
localde...@gmail.com
on 4 Oct 2014 at 1:03