Applies to:
- Liquibase Pro
- Liquibase Open Source (Community)
Conditions:
- Liquibase Pro or Open Source versions 4.25.1, 4.26.0, and 4.27.0
- Any Database
Issue Summary:
When using a Liquibase command, an error will be thrown after a couple of minutes that a NullPointerException error occurred and a null cannot be cast to class liquibase.exception.LiquibaseException.
Error Message:
SEVERE [liquibase.integration] class java.lang.NullPointerException cannot be cast to class liquibase.exception.LiquibaseException (java.lang.NullPointerException is in module java.base of loader 'bootstrap'; liquibase.exception.LiquibaseException is in unnamed module of loader java.net.URLClassLoader @63961c42)
Root Cause:
There is a known bug where Liquibase will display this NullPointerException error message when Liquibase times out waiting for the DATABASECHANGELOGLOCK table to be available.
The default time Liquibase will wait for the DATABASECHANGELOGLOCK table is five minutes. This can be configured via the changelog-lock-wait-time-in-minutes property. Once that time has passed, Liquibase will error with the NullPointerException.
The expected error that is displayed in versions not listed in the conditions section is:
Unexpected error running Liquibase: Could not acquire change log lock. Currently locked by () since ,
Resolution:
This error indicates that Liquibase could not acquire the lock. Look at the target database and ensure that the DATABASECHANGELOGLOCK table is not locked by another process. Once this has been confirmed, rerun the Liquibase command.
If the DATABASECHANGELOGLOCK table is locked, you can use the release-locks command to remove the lock after ensuring that another process is not running on the database.
Related Article(s):
N/A
Comments
0 comments
Article is closed for comments.