Spring 应用程序中的 CommandAcceptanceException

CommandAcceptanceException in spring application

提问人:Fetix 提问时间:10/20/2023 更新时间:10/20/2023 访问量:19

问:

我正在尝试从 2.5 spring 迁移到 2.7,并且在更新 H2 驱动程序版本后遇到了这个问题

这看起来像是 hibernate 的问题,但我有一个非常大的项目,有很多模块,所以我不太明白如何进行

下面我插入了我得到的错误,有很多类似的错误,我已经看到添加列注释可以帮助解决这个问题,但是以项目的大小,它太繁琐了,也许还有其他选择

2023-10-20 16:34:41.797  WARN 8228 --- [           main] o.h.t.s.i.ExceptionHandlerLoggedImpl     : GenerationTarget encountered exception accepting command : Error executing DDL "create table copy_product_customization (id bigint generated by default as identity, price integer not null, type varchar(255) not null, value varchar(255) not null, product_id bigint, primary key (id))" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table copy_product_customization (id bigint generated by default as identity, price integer not null, type varchar(255) not null, value varchar(255) not null, product_id bigint, primary key (id))" via JDBC Statement
    at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) ~[hibernate-core-5.6.9.Final.jar:5.6.9.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:581) ~[hibernate-core-5.6.9.Final.jar:5.6.9.Final] ... etc
Java Spring 休眠 异常 H2

评论


答: 暂无答案