项目

一般

简介

H2数据库报错

邱 京宽将近 2 年 之前添加

报错信息:

2023-03-23 10:16:06 信息 [apusic.con.out-Druid-ConnectionPool-Create-445170933] 10:16:06.832 [Druid-ConnectionPool-Create-445170933] ERROR c.alibaba.druid.pool.DruidDataSource - create connection error, url: jdbc:h2:/root/AAS-V9.0-1/domains/dgsjhj/store/SecureConsole/aas_security;mode=legacy, errorCode 50000, state HY000
org.h2.jdbc.JdbcSQLNonTransientException: General error: "The write format 1 is smaller than the supported format 2 [2.0.206/5]" [50000-206]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:573)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
    at org.h2.message.DbException.get(DbException.java:216)
    at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:166)
    at org.h2.mvstore.db.Store.<init>(Store.java:140)
    at org.h2.engine.Database.<init>(Database.java:324)
    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:117)
    at org.h2.Driver.connect(Driver.java:59)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1421)
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1477)
    at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1998)
Caused by: org.h2.mvstore.MVStoreException: The write format 1 is smaller than the supported format 2 [2.0.206/5]
    at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
    at org.h2.mvstore.MVStore.getUnsupportedWriteFormatException(MVStore.java:1059)
    at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:878)
    at org.h2.mvstore.MVStore.<init>(MVStore.java:455)
    at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4052)
    at org.h2.mvstore.db.Store.<init>(Store.java:129)
    ... 10 common frames omitted

 

解决:

这是因为使用的admin.war或者webtool.war版本过新导致的H2数据库读写信息时报错

按以下连接进行替换

https://dpmp.apusic.com/boards/15/topics/838