12

I am using Postgresql for my db and created all the entities using the JHipster entity wizard. When I try to make any changes like adding/removing fields, relations to an existing entity I am getting a check sum error and Liquibase is not starting. Also, I haven't made any changes on the DB manually.

Any help is appreciated. Thanks. Here is the error I am getting:

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)
Shashi Deshetti
  • 1,354
  • 2
  • 11
  • 22

4 Answers4

14

Executed the following query in Postgres DB which resolved the issue:

UPDATE databasechangelog SET md5sum = null

Shashi Deshetti
  • 1,354
  • 2
  • 11
  • 22
  • It worked for me too, in my case the situation was when i ran for the first time the command `jhipster import-jdl xxxx-jdl.jh` there was an error in the file, so i had to run it again and this error rised. – OJVM Nov 21 '19 at 15:25
11

Can you try maven goal mvn liquibase:clearCheckSums and then try running app again

Hope this helps

nsfreak
  • 186
  • 1
  • 6
3

For Gradle projects run task liquibaseClearChecksums, eg.:

./gradlew liquibaseClearChecksums
Michał Ciołek
  • 319
  • 2
  • 9
2

if you are using maven :

mvn liquibase:clearCheckSums

else if you are using gradle :

./gradlew liquibaseClearChecksums
ZINE Mahmoud
  • 1,272
  • 1
  • 17
  • 32