# Error: Table DATABASECHANGELOGLOCK already exists

**URL:** <https://forum.liquibase.org/t/error-table-databasechangeloglock-already-exists/2641>\
**Category:** Liquibase Development\
**Created:** [April 29, 2013, 12:18am UTC](https://forum.liquibase.org/t/error-table-databasechangeloglock-already-exists/2641 "2013-04-29T00:18:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [April 29, 2013, 12:18am UTC](https://forum.liquibase.org/t/error-table-databasechangeloglock-already-exists/2641/1 "2013-04-29T00:18:00Z")

</div>

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)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd](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  
&nbsp;&nbsp;&nbsp; at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:122)  
&nbsp;&nbsp;&nbsp; at liquibase.lockservice.LockServiceImpl.waitForLock(LockServiceImpl.java:62)  
&nbsp;&nbsp;&nbsp; at liquibase.Liquibase.update(Liquibase.java:123)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:851)  
&nbsp;&nbsp;&nbsp; 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  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:56)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:98)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:64)  
&nbsp;&nbsp;&nbsp; at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogLockTable(AbstractJdbcDatabase.java:767)  
&nbsp;&nbsp;&nbsp; at liquibase.lockservice.LockServiceImpl.acquireLock(LockServiceImpl.java:95)  
&nbsp;&nbsp;&nbsp; … 4 more  
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351. unsuccessful metadata update  
Table DATABASECHANGELOGLOCK already exists  
null  
null  
&nbsp;&nbsp;&nbsp; at org.firebirdsql.jdbc.AbstractStatement.execute(AbstractStatement.java:578)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:86)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:49)  
&nbsp;&nbsp;&nbsp; … 8 more
