H2 - Cannot find generators for database class...

Hi all,

I’m getting an error on one of my projects, but not another which also uses H2 and works just fine. This is encountered when trying to run the Liquibase Spring bean against an in-memory H2 instance, set to run in MySQL mode.

Any ideas?

  1. Caused by: java.lang.IllegalStateException: Cannot find generators for database class liquibase.database.core.H2Database, statement: liquibase.statement.core.FindForeignKeyConstraintsStatement@2206179e

I’ve narrowed it down to the dropAllForeignKeyConstraints command. Is this a known bug?

Yes, the dropAllForegnKeyConstraints only works on a couple database types. Postgres for sure, and I think one other. It should probably be an extension rather than a built-in change because it only works on a few types, but it was contributed just before the extension support was created.