For the first time run , Liquibase update and validate is working and creating tables in DataBase , but when running it again with changes, it is throwing exception with logs
Cannot invoke "String.equalsIgnoreCase(String)" because "this.tableName" is null
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$GetColumnResultSetCache.shouldBulkSelect(JdbcDatabaseSnapshot.java:378)
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:50)
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getColumns(JdbcDatabaseSnapshot.java:323)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:160)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:79)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:312)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:105)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:58)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:34)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:215)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:244)
at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:252)
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:109)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1953)
at liquibase.Liquibase.lambda$update$1(Liquibase.java:251)
at liquibase.Scope.lambda$child$0(Scope.java:180)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:179)
at liquibase.Scope.child(Scope.java:158)
at liquibase.Liquibase.runInScope(Liquibase.java:2447)
liquibase.properties file :–
changeLogFile=changelog.xml
liquibase.command.url=jdbc:cassandra://localhost:9042;AuthMech=1;DefaultKeyspace=casemgmt
liquibase.command.username: cassandra
liquibase.command.password: cassandra
driver: com.simba.cassandra.jdbc42.Driver
changelog.xml file :
<?xml version="1.1" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="12" author="rohit" context="dev">
<sql>
CREATE TABLE IF NOT EXISTS casemgmt.products (
id uuid,
name text PRIMARY KEY,
description text,
price decimal,
created timestamp
);
</sql>
</changeSet>