ChangeFileEncryption.execute fails with proper password?

45 views
Skip to first unread message

Daniel Hopins

unread,
Oct 8, 2022, 3:32:12 PM10/8/22
to H2 Database
I can't figure out what I'm doing wrong here, but the execute method fails, when providing
the same value as provided in dataSource.setPassword(), with stack trace:

org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Store header is corrupt: C:/tmp/testDB.mv.db [2.1.214/6]" [50000-214]
    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.message.DbException.convert(DbException.java:395)
    at org.h2.message.DbException.toSQLException(DbException.java:367)
    at org.h2.tools.ChangeFileEncryption.execute(ChangeFileEncryption.java:131)
    at org.dshops.ib.ds.h2.Main2.main(Main2.java:34)
Caused by: org.h2.mvstore.MVStoreException: Store header is corrupt: C:/tmp/testDB.mv.db [2.1.214/6]
    at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
    at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:869)
    at org.h2.mvstore.MVStore.<init>(MVStore.java:463)
    at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4082)
    at org.h2.tools.ChangeFileEncryption.copyMvStore(ChangeFileEncryption.java:202)
    at org.h2.tools.ChangeFileEncryption.process(ChangeFileEncryption.java:183)
    at org.h2.tools.ChangeFileEncryption.process(ChangeFileEncryption.java:175)
    at org.h2.tools.ChangeFileEncryption.execute(ChangeFileEncryption.java:128)
    ... 1 more


example code attached.


changeFileEncryptionMain.java

Daniel Hopins

unread,
Oct 9, 2022, 12:23:41 PM10/9/22
to H2 Database
resolved.
Reply all
Reply to author
Forward
0 new messages