HSQLDB: LiquiBase 2.0 not recording any DB changes

Color me utterly baffled.  For all operations, LiquiBase looks like it’s working properly: it says it’s creating the DATABASECHANGELOG table; it’s checking and failing preConditions; it says it’s creating tables… it reports success when it should, and it reports failures when it should.


But nothing is ever recorded in the DB.  The DATABASECHANGELOG is never created; nothing is ever done.

 1028)workspace/wpp % ls -l hypersonic total 16940 -rw-rw-r-- 1 russes02 russes02 61 2012-04-13 23:32 csDB.log -rw-rw-r-- 1 russes02 russes02 19672 2012-04-13 23:23 csDB.log.in -rw-rw-r-- 1 russes02 russes02 420 2012-04-13 23:31 csDB.properties -rw-rw-r-- 1 russes02 russes02 8757243 2012-04-13 23:31 csDB.script -rw-rw-r-- 1 russes02 russes02 8550472 2012-04-13 23:23 csDB.script.in -rw-rw-r-- 1 russes02 russes02 410 2012-04-13 23:23 localDB.properties -rw-rw-r-- 1 russes02 russes02 2044 2012-04-13 23:23 localDB.script 1028)workspace/wpp % ~/Software/liquibase/liquibase --classpath /opt/fatwire/App_Server/jboss-portal-2.6.1.GA/server/default/lib/hsqldb.jar --changeLogFile Config/db/init.xml --url jdbc:hsqldb:`pwd`/hypersonic/csDB update Liquibase Home is not set. Liquibase Home: /home/russes02/Software/liquibase INFO 4/13/12 11:45 PM:liquibase: Successfully acquired change log lock INFO 4/13/12 11:45 PM:liquibase: Creating database history table with name: DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: Reading from DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: Reading from DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: ChangeSet Config/db/init.xml::1::russes02 ran successfully in 6ms INFO 4/13/12 11:45 PM:liquibase: Successfully released change log lock Liquibase Update Successful 1029)workspace/wpp % ~/Software/liquibase/liquibase --classpath /opt/fatwire/App_Server/jboss-portal-2.6.1.GA/server/default/lib/hsqldb.jar --changeLogFile Config/db/init.xml --url jdbc:hsqldb:`pwd`/hypersonic/csDB update Liquibase Home is not set. Liquibase Home: /home/russes02/Software/liquibase INFO 4/13/12 11:45 PM:liquibase: Successfully acquired change log lock INFO 4/13/12 11:45 PM:liquibase: Creating database history table with name: DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: Reading from DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: Reading from DATABASECHANGELOG INFO 4/13/12 11:45 PM:liquibase: ChangeSet Config/db/init.xml::1::russes02 ran successfully in 6ms INFO 4/13/12 11:45 PM:liquibase: Successfully released change log lock Liquibase Update Successful 1029)workspace/wpp % ls -l hypersonic total 16876 -rw-rw-r-- 1 russes02 russes02 0 2012-04-13 23:45 csDB.log -rw-rw-r-- 1 russes02 russes02 19672 2012-04-13 23:23 csDB.log.in -rw-rw-r-- 1 russes02 russes02 411 2012-04-13 23:45 csDB.properties -rw-rw-r-- 1 russes02 russes02 8694915 2012-04-13 23:45 csDB.script -rw-rw-r-- 1 russes02 russes02 8550472 2012-04-13 23:23 csDB.script.in -rw-rw-r-- 1 russes02 russes02 410 2012-04-13 23:23 localDB.properties -rw-rw-r-- 1 russes02 russes02 2044 2012-04-13 23:23 localDB.script 1030)workspace/wpp % java -jar ~/hsqldb/lib/hsqldb.jar liquibase JDBC Connection established to a HSQL Database Engine v. 1.8.0 database as "SA". SqlTool v. 333. (SqlFile processor v. 354) Distribution is permitted under the terms of the HSQLDB license. (c) 2004-2007 Blaine Simpson and the HSQLDB Development Group. 
(lots of verbose HSQL crap cut)
 sql> select * from databasechangelog; SQL Error at 'stdin' line 1: "select * from databasechangelog" Table not found in statement [select * from databasechangelog] 
Does anybody have any idea why it might behave this way?  Notice that each time LiquiBase is run, it creates the change log table again.  It's doing somethin': the time stamp of the DB file is changing, as is the size.  I've tried a couple of things, such as manually creating the DATABASECHANGELOG table from sqltool (this works fine), but LiquiBase never puts anything in it.  And my little dummy table that the change log creates -- well, LiquiBase debugging says it's creating the table, but it, too, doesn't actually get created.  I turned on debug logging, and saw about what I'd expect... no hidden errors or exceptions -- LiquiBase really does think everything it is doing is succeeding.


Any ideas, at all?

Nice.  Just lovely.  Everything, including the preview, showed the post as formatted correctly, but of course, actually publishing the post screwed up the formatting.

Answering my own question (a little bit):


LiquiBase does not work with a file system URI for HSQLDB if the WRITE_DELAY is set to a non-0 value (no, I didn’t try all non-zero values).  The HSQLDB documentation says that if you see a lot of stuff in the .log file, then it means the client shutting down the DB properly, and I’m seeing this (http://hsqldb.org/web/hsqlFAQ.html#FAQ, ca. the 10th bullet point).  I still don’t know what’s the root cause, but there’s something definitely funky going on when LiquiBase is used with HSQLDB via a file-path URI.

I have the same problem, but in my case DATABASECHANGELOG is created, but other tables aren’t.

Do you have an example changelog I can use and how you are replicating the issue?

Nathan

I have the same problem, unfortunately.

I confirm also that with 2.0.4 and 2.0.5 versions running with HSQLDB, changes in the data base are not recorded.


Please see my post in the Development forum. Basically I discovered that some liquibase methods (the ones accepting Writer output argument) do not write in the data base but instead in the console. Using the other liquibase methods the update and rollback seemed to work.

Yes, that is the case. Glad you figured it out.


Nathan