How to fix: Embedded H2 Database “NonTransientError: Unable to read the page at position” error?

前端 未结 5 1506
一生所求
一生所求 2021-01-17 16:51

I am creating a JavaFX program with an embedded H2 database that will be used to handle user logins and passwords. Using Intellij Ultimate, I have a database that I can run

5条回答
  •  长发绾君心
    2021-01-17 17:37

    As already noted by @Yura , you need to ensure that all your code base and all your tools use the same version of the driver, be it 1.4.196 or 1.4.200.

    Next, if there was nothing valuable in your db, you can safely drop the db file, and it will be re-created again.

    If you had some valuable data and you have no backup, then getting the db repaired may become a quest, not necessarily successful...

    And if you have a backup, then a procedure of "backup-to-sql-using-196" and "restore-from-sql-using-200" is most likely to do the job for you, see http://www.h2database.com/html/tutorial.html#upgrade_backup_restore ...

提交回复
热议问题