How to tag a database with liquibase 3.2.0 ?


i am doing my first steps with liquibase and oracle. Changing the database is fine, but I am not able to tag the database.

First I tried the command line, but the tag command returned  an "Unexprected error with Unknown reason (NullPointerException).

Then I tried in my changelog.
The result was that only the last changeset gets the tag added. I found that this is the way liquibase works. But rolling back this tag has no effect. The database remains unchanged. Table databaseChangelog still contains the entry and the tag.

When I roll the changes back using the rollbackCount command, everything works fine.

Could someone please tell me, what I am doing wrong. Or is there a problem with this version ?

Kind regards,

This is the intended behavior. When you roll back and use a tag, Liquibase rolls back everything that changed after the tag. It does not remove the tag itself. The intent is that you would mark a set of changes with, for example, “Version1”, and then deploy those changes. If you then came along a week later to apply a set of changes “Version1-1”, and there was a problem with that deploy, you could then roll back to “Version1”

It would be helpful to file a bug with repro steps for the null pointer exception case you experienced. 

Steve Donie
Principal Software Engineer
Datical, Inc.

I also received a null pointer using the tag database command, running with Ant.  But checking the DATABASECHANGELOG file I see that it did apply the tag I gave.

Buildfile: C:\Production\jboss_emr\g2\build-ci.xml
[tagDatabase] WARNING 7/8/14 10:09 AM: liquibase: Can not use class liquibase.ext.hibernate.database.HibernateSpringDatabase as a Liquibase service because is not in the classpath
[tagDatabase] INFO 7/8/14 10:09 AM: liquibase: Successfully acquired change log lock
[tagDatabase] INFO 7/8/14 10:09 AM: liquibase: Successfully released change log lock

C:\Production\jboss_emr\g2\build-ci.xml:383: liquibase.exception.DatabaseException: java.lang.NullPointerException

Total time: 5 seconds
Here’s my ant target.


All of the properties and references used work in my updateDatabase target so those are correct.

The null pointer exception should be fixed in the upcoming 3.2.1 release.