Error: Table DATABASECHANGELOGLOCK already exists

Liquibase 3 bata 2
Firebird database 2.52

I have a test suite of changelogs that run fine with Liquibase legacy 2.

The same test suite (with the correct header pointing to xsi:schemaLocation=“http://www.liquibase.org/xml/ns/dbchangelog
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd”>) fails immediately as soon as I try to run the second changelog.
I mean the the first changelog runs fine, but the seconds fails.
If I try to run all the changelogs including them in a changelog with the include directive, all runs fine.
So I strongly suspect that my problem is related to some kind of transaction non handled correctly.

Nathan, if you want I can zip all the xml and batch files to further investigate, since is a suite of tests quite extensive for Firebird.

Any idea?


fabio vitale


DEBUG 28/04/13 19.11:liquibase: Unable to load/access Apache Derby driver class to check version
DEBUG 28/04/13 19.11:liquibase: Connected to SYSDBA@jdbc:firebirdsql:java:localhost/3050:c:/liquibase.fdb
DEBUG 28/04/13 19.11:liquibase: Not adjusting the auto commit mode; it is already true
DEBUG 28/04/13 19.11:liquibase: Create Database Lock Table
DEBUG 28/04/13 19.11:liquibase: Executing EXECUTE database command: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))
SEVERE 28/04/13 19.11:liquibase: Error executing SQL CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:firebirdsql:java:localhost/3050:c:/liquibase.fdbINSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): GDS Exception. 335544351. unsuccessful metadata update
Table DATABASECHANGELOGLOCK already exists
null
null
liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:firebirdsql:java:localhost/3050:c:/liquibase.fdbINSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): GDS Exception. 335544351. unsuccessful metadata update
Table DATABASECHANGELOGLOCK already exists
null
null
    at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:122)
    at liquibase.lockservice.LockServiceImpl.waitForLock(LockServiceImpl.java:62)
    at liquibase.Liquibase.update(Liquibase.java:123)
    at liquibase.integration.commandline.Main.doMigration(Main.java:851)
    at liquibase.integration.commandline.Main.main(Main.java:138)
Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED SMALLINT NOT NULL, LOCKGRANTED TIMESTAMP, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID)); on jdbc:firebirdsql:java:localhost/3050:c:/liquibase.fdbINSERT INTO DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0): GDS Exception. 335544351. unsuccessful metadata update
Table DATABASECHANGELOGLOCK already exists
null
null
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:64)
    at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogLockTable(AbstractJdbcDatabase.java:767)
    at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:95)
    … 4 more
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351. unsuccessful metadata update
Table DATABASECHANGELOGLOCK already exists
null
null
    at org.firebirdsql.jdbc.AbstractStatement.execute(AbstractStatement.java:578)
    at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49)
    … 8 more