# How to tag a database with liquibase 3.2.0 ?

**URL:** <https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041>\
**Category:** General Discussion\
**Created:** [June 20, 2014, 6:05pm UTC](https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041 "2014-06-20T18:05:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.roeper](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@m.roeper](https://forum.liquibase.org/u/m.roeper)\
**Post date:** [June 20, 2014, 6:05pm UTC](https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041/1 "2014-06-20T18:05:00Z")

</div>

Hi,  
  
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&nbsp; 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,  
Michael

---

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [June 20, 2014, 6:05pm UTC](https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041/2 "2014-06-20T18:05:00Z")

</div>

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.&nbsp;  
  
Steve Donie  
Principal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)

---

<div class="post-metadata">

**Author:** ![un1401477352987r69id](https://avatars.discourse-cdn.com/v4/letter/u/eb9ed0/32.png) [@un1401477352987r69id](https://forum.liquibase.org/u/un1401477352987r69id)\
**Post date:** [June 20, 2014, 6:05pm UTC](https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041/3 "2014-06-20T18:05:00Z")

</div>

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

> Buildfile: C:\Production\jboss\_emr\g2\build-ci.xml  
> tag-database:  
> [tagDatabase] WARNING 7/8/14 10:09 AM: liquibase: Can not use class liquibase.ext.hibernate.database.HibernateSpringDatabase as a Liquibase service because org.springframework.beans.factory.support.BeanDefinitionRegistry 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  
>   
> BUILD FAILED  
> C:\Production\jboss\_emr\g2\build-ci.xml:383: liquibase.exception.DatabaseException: java.lang.NullPointerException  
>   
> Total time: 5 seconds

Here’s my ant target.  
  
&nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \<tagDatabase  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver=“${database.driver}”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url=“${database.url}”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; username=“${database.username}”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; password=“${database.password}”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref=“g2.classpath”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tag=“R1.0”  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \>  
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;   
&nbsp;&nbsp;&nbsp;   
  
All of the properties and references used work in my updateDatabase target so those are correct.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [June 20, 2014, 6:05pm UTC](https://forum.liquibase.org/t/how-to-tag-a-database-with-liquibase-3-2-0/3041/4 "2014-06-20T18:05:00Z")

</div>

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

Nathan
