General error: "Chunk 849734 not found [2.1.212/9]

63 views
Skip to first unread message

Shubham kapoor

unread,
Oct 20, 2022, 5:38:10 AM10/20/22
to H2 Database
Hi, 

I have recently upgraded h2db from version 1 to version 2 and followed the below steps

Step1) java -cp h2-1.4.192.jar org.h2.tools.RunScript -url jdbc:h2:./h2db -script migrate.sql

Some alters in migrate.sql.  

Step2) java -cp h2-1.4.192.jar org.h2.tools.Script -url jdbc:h2:./h2db -script h2db.zip -options compression zip

Step3) java -cp h2-2.1.212.jar org.h2.tools.RunScript -url jdbc:h2:./h2db -script h2db.zip -options compression zip FROM_1X


Data was successfully migrated to a newer version, but now I am getting below error


Exception in thread "main" org.h2.jdbc.JdbcSQLNonTransientException: General error: "Chunk 849734 not found [2.1.212/9]"; SQL statement:

CREATE CACHED TABLE "PUBLIC"."ABC_XYZ"(

    "ID" BIGINT SELECTIVITY 100 NOT NULL,

    "MACHINE_ID" BIGINT SELECTIVITY 1,

    "WHEN_CREATED" BIGINT SELECTIVITY 100 NOT NULL,

    "STATE" INTEGER SELECTIVITY 1,

    "WHEN_STATE_LAST_CHANGED" BIGINT SELECTIVITY 1,

    "WHO_CHANGED_STATE_LAST" BIGINT SELECTIVITY 1

) [50000-212]

        at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)

        at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)

        at org.h2.message.DbException.get(DbException.java:212)

        at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:170)

        at org.h2.mvstore.db.Store.createTable(Store.java:220)

        at org.h2.schema.Schema.createTable(Schema.java:781)

        at org.h2.command.ddl.CreateTable.update(CreateTable.java:109)

        at org.h2.engine.MetaRecord.prepareAndExecute(MetaRecord.java:77)

        at org.h2.engine.Database.executeMeta(Database.java:660)

        at org.h2.engine.Database.executeMeta(Database.java:634)

        at org.h2.engine.Database.<init>(Database.java:357)

        at org.h2.engine.Engine.openSession(Engine.java:92)

        at org.h2.engine.Engine.openSession(Engine.java:222)

        at org.h2.engine.Engine.createSession(Engine.java:201)

        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338)

        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122)

        at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:288)

        at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:270)

        at org.h2.tools.Shell.runTool(Shell.java:146)

        at org.h2.tools.Shell.main(Shell.java:80)

Caused by: org.h2.mvstore.MVStoreException: Chunk 849734 not found [2.1.212/9]


With version 1 I have never encountered this issue. Can anyone help me with and how can I resolve this? It's a production issue on the customer end.

Thanks a lot.


Shubham kapoor

unread,
Oct 26, 2022, 1:44:30 AM10/26/22
to H2 Database
Hi, 

I guess many of us have faced this issue, but no one has replied to it yet. Can anyone please help me with this?
Reply all
Reply to author
Forward
0 new messages