编辑使用实体向导生成的现有实体时,在JHipster中检查Sum错误

时间:2016-12-07 13:41:22

标签: postgresql liquibase jhipster

我正在使用Postgresql作为我的数据库,并使用JHipster实体向导创建了所有实体。当我尝试进行任何更改,如添加/删除字段,与现有实体的关系,我收到校验和错误,Liquibase没有启动。另外,我没有手动对数据库进行任何更改。

感谢任何帮助。谢谢。这是我得到的错误:

2016-12-07 07:36:12.136 ERROR 8644 --- [cker-Executor-1] i.f.p.c.liquibase.AsyncSpringLiquibase   : Liquibase could not start correctly, your database is NOT ready: Validation Failed:
     1 change sets check sum
          classpath:config/liquibase/changelog/20161205191514_added_entity_Person.xml::20161205191514-1::jhipster is now: 7:b92d6a054bbdf952b81fa58376bd6a75


liquibase.exception.ValidationFailedException: Validation Failed:
     1 change sets check sum
          classpath:config/liquibase/changelog/20161205191514_added_entity_Person.xml::20161205191514-1::jhipster is now: 7:b92d6a054bbdf952b81fa58376bd6a75

        at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:215)
        at liquibase.Liquibase.update(Liquibase.java:208)
        at liquibase.Liquibase.update(Liquibase.java:192)
        at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:434)
        at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:391)
        at in.factly.promisetracker.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:67)
        at in.factly.promisetracker.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$3(AsyncSpringLiquibase.java:50)
        at in.factly.promisetracker.config.liquibase.AsyncSpringLiquibase$$Lambda$28/847553836.run(Unknown Source)
        at in.factly.promisetracker.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:47)
        at in.factly.promisetracker.async.ExceptionHandlingAsyncTaskExecutor$$Lambda$29/342644967.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

4 个答案:

答案 0 :(得分:7)

在Postgres DB中执行以下查询以解决问题:

UPDATE databasechangelog SET md5sum = null

答案 1 :(得分:3)

您可以尝试maven目标mvn liquibase:clearCheckSums,然后再次尝试运行应用

希望这有帮助

答案 2 :(得分:1)

对于Gradle项目,运行任务liquibaseClearChecksums,例如:

./gradlew liquibaseClearChecksums

答案 3 :(得分:0)

如果您正在使用maven

mvn liquibase:clearCheckSums

否则,如果您使用的是gradle

./gradlew liquibaseClearChecksums