Liquibase 3.0.2 NullPointerException and logging request

I’m converting an existing set of changeset files over to use liquibase 3.0.2 from version 2.0.0.  I’ve updated the schema versions, but when running one of my changesets now, I’m receiving the following NPE:


DEBUG 7/23/13 3:18 PM:liquibase: Executing UPDATE database command: UPDATE ntdm.databasechangelogloc

k SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1

INFO 7/23/13 3:18 PM:liquibase: Successfully released change log lock

Liquibase update Failed: Unknown Reason

SEVERE 7/23/13 3:18 PM:liquibase: Unknown Reason

java.lang.NullPointerException

        at liquibase.precondition.core.ChangeSetExecutedPrecondition.check(ChangeSetExecutedPrecondi

tion.java:52)

        at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34)

        at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199)

        at liquibase.changelog.visitor.ValidatingVisitor.validate(ValidatingVisitor.java:52)

        at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:143)

        at liquibase.Liquibase.update(Liquibase.java:132)

        at liquibase.integration.commandline.Main.doMigration(Main.java:848)

        at liquibase.integration.commandline.Main.main(Main.java:138)


The lock is released correctly in the databasechangeloglock table.  This is on Postgres 9.2.  All changesets previously ran correctly under 2.0 (no changes to content, except for the schema version).


When this error occurs, the errorlevel return value is not set correctly (running in a windows batch file environment)


**Also, version 2.0 logged the name of each changeset file as it was executed.  We used those log messages extensively to track where we were when an update failed. I’ve tried both INFO and DEBUG levels with 3.0.2, but it doesn’t seem to log the change file it’s executing.  That info would be nice to know in this situation.  Could that message be added back?  




Will you get the same error if you downgrade to 3.0.0?

Yes, the same error with v3.0.0:


INFO 7/30/13 7:57 AM:liquibase: Successfully released change log lock

Liquibase update Failed: Unknown Reason

SEVERE 7/30/13 7:57 AM:liquibase: Unknown Reason

java.lang.NullPointerException

        at liquibase.precondition.core.ChangeSetExecutedPrecondition.check(ChangeSetExecutedPrecondi

tion.java:52)

        at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34)

        at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199)

        at liquibase.changelog.visitor.ValidatingVisitor.validate(ValidatingVisitor.java:52)

        at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:143)

        at liquibase.Liquibase.update(Liquibase.java:132)

        at liquibase.integration.commandline.Main.doMigration(Main.java:848)

        at liquibase.integration.commandline.Main.main(Main.java:138)



For more information, use the --logLevel flag

I was able to reproduce it and fix it for 3.0.3 as https://liquibase.jira.com/browse/CORE-1413.


I agree that the command line output should be better. I scaled it back for 3.x but have since decided it is too scaled back. I’ll find a better mix in 3.1


Nathan

Thanks, it’s now working perfectly in 3.0.3.