Hi,

I would be interested to analyze the database file if you still have them.

Regards,
Thomas

On Tuesday, July 12, 2016, Zheng Wang <[email protected]> wrote:

> I met the same problem. H2 database 1.4.191 was corrupted after a Windows
> 7 crash.
> When connecting to the database via Squirrel using URL
> jdbc:h2:C:/Temp/database_corrupted/database/test;AUTO_SERVER=TRUE, I got
> below error
>
> java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: null.
> Possible solution: use the recovery tool [90030-191]
> at java.util.concurrent.FutureTask.report(Unknown Source)
> at java.util.concurrent.FutureTask.get(Unknown Source)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.RuntimeException: org.h2.jdbc.JdbcSQLException: File
> corrupted while reading record: null. Possible solution: use the recovery
> tool [90030-191]
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
> ... 5 more
> Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
> record: null. Possible solution: use the recovery tool [90030-191]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
> at org.h2.message.DbException.get(DbException.java:168)
> at
> org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:195)
> at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
> at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
> at org.h2.engine.Database.getPageStore(Database.java:2460)
> at org.h2.engine.Database.open(Database.java:692)
> at org.h2.engine.Database.openDatabase(Database.java:270)
> at org.h2.engine.Database.<init>(Database.java:264)
> at org.h2.engine.Engine.openSession(Engine.java:65)
> at org.h2.engine.Engine.openSession(Engine.java:175)
> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:153)
> at org.h2.engine.Engine.createSession(Engine.java:136)
> at org.h2.engine.Engine.createSession(Engine.java:28)
> at
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
> at org.h2.Driver.connect(Driver.java:72)
> at
> net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
> ... 7 more
> Caused by: java.lang.IllegalStateException: File corrupted in chunk 19309,
> expected page length 4..1024, got 745365880 [1.4.191/6]
> at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
> at org.h2.mvstore.Page.read(Page.java:649)
> at org.h2.mvstore.Page.read(Page.java:195)
> at org.h2.mvstore.MVStore.readPage(MVStore.java:1939)
> at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
> at org.h2.mvstore.Page.getChildPage(Page.java:217)
> at org.h2.mvstore.Cursor.fetchNext(Cursor.java:150)
> at org.h2.mvstore.Cursor.next(Cursor.java:50)
> at org.h2.mvstore.MVStore.loadChunkMeta(MVStore.java:690)
> at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:670)
> at org.h2.mvstore.MVStore.<init>(MVStore.java:353)
> at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2888)
> at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
> ... 23 more
>
>
> When running the Recover command 'java -cp h2-1.4.191.jar
> org.h2.tools.Recover', I got below error
>
> Exception in thread "main" java.lang.IllegalStateException: File corrupted
> in chunk 19309, expected page length 4..1024, got 745365880 [1.4.191/6]
>         at
> org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
>
>         at org.h2.mvstore.Page.read(Page.java:649)
>         at org.h2.mvstore.Page.read(Page.java:195)
>         at org.h2.mvstore.MVStore.readPage(MVStore.java:1939)
>         at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
>         at org.h2.mvstore.Page.getChildPage(Page.java:217)
>         at org.h2.mvstore.Cursor.fetchNext(Cursor.java:150)
>         at org.h2.mvstore.Cursor.next(Cursor.java:50)
>         at org.h2.mvstore.MVStore.loadChunkMeta(MVStore.java:690)
>         at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:670)
>         at org.h2.mvstore.MVStore.<init>(MVStore.java:353)
>         at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2888)
>         at org.h2.mvstore.MVStoreTool.info(MVStoreTool.java:336)
>         at org.h2.tools.Recover.process(Recover.java:342)
>         at org.h2.tools.Recover.runTool(Recover.java:196)
>         at org.h2.tools.Recover.main(Recover.java:159)
>
> Found a similar issue https://github.com/h2database/h2database/issues/142
> which seems indicating corruption is no longer an issue since 1.4.188, but
> actually it is still an issue.
>
> I hope H2 developers can look into this, as it is really shocking to lose
> all the data so easily.
>
> Thanks
>
> --
> 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 [email protected]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to