When I try to use the Liquibase API (liquibase.update) directly in the java code I got the follwowing error msg:
Error executing SQL UPDATE DATABASECHANGELOGLOCK SET LOCKED = TRUE, LOCKEDBY = 'fe80:0:0:0:20c:29ff:fed6:8779%2 (fe80:0:0:0:20c:29ff:fed6:8779%2)', LOCKGRANTED = TIMESTAMP('2011-11-08 09:04:43.379000') WHERE ID = 1 AND LOCKED = FALSE: Syntax error: TRUE.
at liquibase.lockservice.LockService.acquireLock(LockService.java:121)
at liquibase.lockservice.LockService.waitForLock(LockService.java:61)
at liquibase.Liquibase.update(Liquibase.java:101)
The reason for the error I believe is because the class UnlockDatabaseChangeLogGenerator tries to update the column LOCKED, which is defined as SMALLINT, in the table DATABASECHANGELOGLOC with TRUE and not with '1'. I guess his will work fine for the most databaseses, but not for Derby.