Skip to content
Latchkey

Liquibase "Unexpected error running Liquibase" in CI

"Unexpected error running Liquibase" is the generic prefix Liquibase prints for many failures. The actionable detail follows it: a failed SQL statement, a changelog that cannot be found or parsed, or a missing property.

What this error means

liquibase update exits non-zero with "Unexpected error running Liquibase:" followed by a specific message, for example a missing changelog file or a SQL error.

liquibase output
Unexpected error running Liquibase: liquibase.exception.ChangeLogParseException:
The file db/changelog/db.changelog-master.xml was not found in the configured search path

Common causes

The changelog file or search path is wrong

The master changelog cannot be found at the configured path in the CI checkout, so parsing fails before any changeset runs.

A changeset SQL or parse error

A statement inside a changeset fails, or the changelog cannot be parsed, and Liquibase wraps it in the generic message.

How to fix it

Read the message after the prefix

  1. Look at the text after "Unexpected error running Liquibase:"; it names the real problem.
  2. For a missing changelog, fix --changelog-file / searchPath to point at the file in the repo.
  3. For a SQL or parse error, correct the offending changeset.
Terminal
liquibase --changelog-file=db/changelog/db.changelog-master.xml update

Verify the changelog path in CI

Confirm the working directory and search path match where the changelog lives in the checkout.

How to prevent it

  • Always read the specific error after the generic prefix.
  • Pin --changelog-file and search path to the repo layout.
  • Test the changelog runs from a clean checkout in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →