H2 update not working

Hi,

I’m trying to create a very simple test db using H2.
I’ve created a changelog and have all the connection settings correct.
I’m just letting H2 generate the db from the request and am currently telling liquibase to use the ‘public’ schema.

Everytime I try to run the update I get:

    ... lots of stack trace ... Caused by: org.h2.jdbc.JdbcSQLException: Table DATABASECHANGELOGLOCK already exists; SQL statement: CREATE TABLE public.DATABASECHANGELOGLOCK ...

My changelog is setup like this:
main.xml
  --> 1.0.0-dev1/releasechanges.xml
  --> 1.0.0-dev1/2009-07-15-CFREF-1.xml

the 2009-07-15-CFREF-1.xml contains the only “real” changeset:

    http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">                                                                                                                                                                                                                                                                                                                                                        

And here ar my connection settings:

    liquibase.db.schema=public liquibase.db.url=jdbc:h2:${build.dir}/war/h2db/testh2db;MODE=MySQL liquibase.db.user=admin liquibase.db.pass=admin liquibase.db.driver=org.h2.Driver liquibase.contexts=test liquibase.prompt.non.local=false

Anyone have any idea what’s going on with this??

It looks like it should work.  What version of liquibase are you running?  Could you post the whole stacktrace?

Nathan

Two years later, some input: I just saw this same thing happen, and fixed it by bouncing the H2 database server. (The H2 server process was running, and I killed and restarted it.) Everything looks good from here.