Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase 3.4.2 H2 database

$
0
0
Hello 

We recently upgraded liquibase to use the latest version (3.4.2) and we use H2 in memory database. With the new version I'm getting the below exception 

2016-04-20 10:08:12,284 [main] ERROR - [h2database.write()] - jdbc[6] exception org.h2.jdbc.JdbcSQLException: Table "DATABASECHANGELOGLOCK" not found; SQL statement:
select count(*) from PUBLIC.DATABASECHANGELOGLOCK [42102-180]

This works perfectly fine with 3.3.0. 

Could someone please help.

Thanks in advance

Regards
Vinitha

Some additional information after some debugging....following code in SnapshotGeneratorFactory seems to be the problem creator. Are there any additional flags that we can set to indicate its in memory and database changelock table will not be available ?

   //workaround for common check for databasechangelog/lock table to not snapshot the whole database like we have to in order to handle case issues
        if (example instanceof Table && (example.getName().equals(database.getDatabaseChangeLogTableName()) || example.getName().equals(database.getDatabaseChangeLogLockTableName()))) {
            try {
                ExecutorService.getInstance().getExecutor(database).queryForInt(new RawSqlStatement("select count(*) from " + database.escapeObjectName(database.getLiquibaseCatalogName(), database.getLiquibaseSchemaName(), example.getName(), Table.class)));
                return true;
            } catch (DatabaseException e) {
                if (database instanceof PostgresDatabase) { //throws "current transaction is aborted" unless we roll back the connection
                    database.rollback();
                }
                return false;
            }
        }

Viewing all articles
Browse latest Browse all 2993

Trending Articles