小编Rit*_*rra的帖子

运行 Spring 测试时如何使用 H2 插件(版本 1.4.200)修复错误:JdbcSQLSyntaxErrorException:未找到列“start_value”

我不得不将 Spring Boot starter 从 2.1.4.RELEASE 更新到 2.2.6.RELEASE,但现在集成测试失败了。

我的测试是用 Groovy 编写的,我的应用程序是用 Java 编写的。它们与之前的 Spring 版本 (2.1.4) 运行良好。

SpringBoot Starter版本更新后,运行集成测试时,日志中开始出现新的错误:

H2 - 版本

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
           <version>1.4.200</version>
            <scope>test</scope>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

这是日志:

====================== Init Spring ======================
2020-10-30 16:43:17.867  WARN 13275 --- [           main] kafka.server.BrokerMetadataCheckpoint    : No meta.properties file under dir /tmp/kafka-14845506122745551840/meta.properties
2020-10-30 16:43:19.651 ERROR 13275 --- [           main] o.h.e.j.e.internal.JdbcEnvironmentImpl   : Could not fetch the SequenceInformation from the database

org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "start_value" not found [42122-200]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:453)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
    at org.h2.message.DbException.get(DbException.java:205)
    at org.h2.message.DbException.get(DbException.java:181)
    at …
Run Code Online (Sandbox Code Playgroud)

spring h2 spock spring-boot

6
推荐指数
2
解决办法
1629
查看次数

标签 统计

h2 ×1

spock ×1

spring ×1

spring-boot ×1