Skip to content
Latchkey

Spring Boot Liquibase "Validation Failed" checksum in CI

Spring Boot runs Liquibase on startup. A ValidationFailedException means a changeSet recorded in DATABASECHANGELOG was edited after it ran, so its stored MD5 checksum no longer matches the changelog.

What this error means

Startup fails with "liquibase.exception.ValidationFailedException: Validation Failed: 1 changesets check sum" naming a changeSet whose checksum differs.

Spring Boot
liquibase.exception.ValidationFailedException: Validation Failed:
     1 changesets check sum
          db/changelog/002-add-status.xml::2::alice was: 8:abc... but is now: 8:def...

Common causes

An executed changeSet was modified

The body of a changeSet already in DATABASECHANGELOG changed, so the recomputed checksum no longer matches the stored one.

A formatting or logic change altered the checksum

Even reformatting SQL inside a ran changeSet changes its MD5, tripping validation on a persistent DB.

How to fix it

Add a new changeSet instead of editing

  1. Restore the modified changeSet to its original content.
  2. Express the change as a new changeSet with a unique id.
  3. Re-run so validation passes.
db/changelog
<changeSet id="3" author="alice">
  <addColumn tableName="orders"><column name="status" type="varchar(32)"/></addColumn>
</changeSet>

Clear checksums only if the change is intentional

When you deliberately changed a changeSet, clear stored checksums so Liquibase recomputes them.

Terminal
liquibase clearCheckSums

How to prevent it

  • Treat executed changeSets as immutable.
  • Run Liquibase against a fresh CI database to catch drift early.
  • Review changelog diffs so edits to ran changeSets are caught.

Frequently asked questions

What causes ""liquibase.exception.ValidationFailedException""?
The body of a changeSet already in DATABASECHANGELOG changed, so the recomputed checksum no longer matches the stored one.
How do I fix "liquibase.exception.ValidationFailedException"?
Add a new changeSet instead of editing

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card