perfino 启动错误;可能损坏的 H2 数据库

perfino startup error; possible corrupted H2 database

我们的 H2 数据库似乎损坏了。这是 server.log 启动时的输出。有什么方法可以恢复数据,还是我们最好重新开始?

2018-02-26 13:24:03,867 INFO  [main] server: Starting server
2018-02-26 13:24:04,602 INFO  [main] server: Starting database in directory E:\ProgramData\perfino
2018-02-26 13:24:05,381 ERROR [main] server: Cannot connect to database or access schema version
org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: rowcount remaining=1 SYS" [50000-176]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.convert(DbException.java:294)
    at org.h2.engine.Database.openDatabase(Database.java:291)
    at org.h2.engine.Database.<init>(Database.java:254)
    at org.h2.engine.Engine.openSession(Engine.java:57)
    at org.h2.engine.Engine.openSession(Engine.java:164)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:142)
    at org.h2.engine.Engine.createSession(Engine.java:125)
    at org.h2.engine.Engine.createSession(Engine.java:27)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:331)
    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:74)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.perfino.c.a.a(ejt:207)
    at com.perfino.c.a.a(ejt:138)
    at com.perfino.server.ServerMain.main(ejt:248)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
    at com.exe4j.runtime.WinLauncher.run(WinLauncher.java:96)
Caused by: java.lang.RuntimeException: rowcount remaining=1 SYS
    at org.h2.message.DbException.throwInternalError(DbException.java:241)
    at org.h2.table.RegularTable.addIndex(RegularTable.java:284)
    at org.h2.engine.Database.open(Database.java:705)
    at org.h2.engine.Database.openDatabase(Database.java:260)
    ... 21 more

H2没有数据恢复工具。如果你有数据库的备份,我会建议切换到备份。

要重置数据库,请转到数据库目录并在服务器停止时删除文件 perfino.h2.dbperfino.trace.db

配置数据位于config.h2.db,将被保留。