How to avoid ValidationFailedException after Liquibase upgrade for Spring-based modules

This article describes how to avoid checksum validation issues after upgrading to the 4.3.5 version of Liquibase


After updating to the Liquibase version 4.3.5, that will be done automatically if we update the folio-spring-base library version from 1.x.x to 2.x.x,  we can get ValidationFailedException during enabling the module for the tenant.


  1. Maven command
  2. Application property
  3. RunOnChange attribute with precondition

Step-by-step guide

Maven command

We can clear and recalculate the Liquibase checksum using mvn liquibase:clearCheckSums command. The disadvantage of this option is that we have to do some manual work each time we are facing this issue.

Application property

The other option is to add a new property to our application properties: spring.liquibase.clear-checksums = true, which is applicable for all Spring-based modules. The disadvantage of this option is that we are disabling the benefits of checkSums.

RunOnChange attribute with precondition

This is the most convenient way to solve this problem. Each time we are writing the script to create some table, we need to add the runOnChange parameter to the changeSet and use precondition to not run this script if the table already exists. 

The example of creating the table with this params:

Script example of reating the table
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns:xsi=""
  <changeSet id="01_create_test_table" author="" runOnChange="true">
    <preConditions onFail="MARK_RAN">
        <tableExists tableName="test_table"/>
    <createTable tableName="test_table">
      <column name="id" type="SERIAL">
        <constraints nullable="false" primaryKey="true"/>
      <column name="test_value" type="jsonb">
        <constraints nullable="false"/>

runOnChange liquibase property -
liquibase precondition -