After successful first "update", subsequent executions of liquibase in the same JVM against the same database fails

Description

I have a spring context which I create and destroy for each test suite. This spring context has a liquibase bean definition which updates my changelog.

First execution of liquibase against an H2 database works properly (first test suite).
Subsequent executions fail on line 97 of LockService.java:

Boolean locked = (Boolean) ExecutorService.getInstance().getExecutor(database).queryForObject(new SelectFromDatabaseChangeLogLockStatement("LOCKED"), Boolean.class);

The exception thrown is:

liquibase.exception.LockException: liquibase.exception.LockException: Did not update change log lock correctly.

0 rows were updated instead of the expected 1 row using executor liquibase.executor.jvm.JdbcExecutor there are 0 rows in the table

Possible hint (not sure, just a conjecture):

in SpringLiquibase (Lines 226 - 246):

This snippet is executed even if there is no exception:

This rollback() is OK?

Environment

JVM 1.6.25, Liquibase 2.0.1, H2 database, Spring bean

Activity

Show:

Nathan Voxland September 7, 2011 at 5:31 PM

Thanks for the update

Francisco Alejandro Lozano López August 18, 2011 at 1:08 PM

The issue was caused by an artifact which has nothing to see with Liquibase (dbUnit), my apologies.

Francisco Alejandro Lozano López August 18, 2011 at 12:13 PM

Just tried without this rollback(), it has no effect.

Cannot Reproduce

Details

Reporter

Components

Affects versions

Priority

Created August 18, 2011 at 9:14 AM
Updated June 20, 2013 at 3:30 AM
Resolved August 18, 2011 at 1:08 PM