I’m writing small PoC, which should use both some standard relational db and cassandra. I have some older code using liquibase 4.27.0, where relational part works just fine. So I’m just using the similar + newer liquibase version.
as shown here, Liquibase for Apache Cassandra - contribute.liquibase.com
I added following dependencies both to maven (from which I build shaded jar, which I then invoke), and also to lib folder of liquibase 4.31.1 for invocations using liquibase skd.
<dependency>
<groupId>com.ing.data</groupId>
<artifactId>cassandra-jdbc-wrapper</artifactId>
<version>4.13.0</version>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-cassandra</artifactId>
<version>4.29.1</version>
</dependency>
I’m having just this trivial changeset:
<changeSet dbms="oracle,h2,postgresql,cassandra" id="createInitialTag" author="mmucha" >
<tagDatabase tag="@initial"/>
</changeSet>
and in both cases I’m getting:
Caused by: liquibase.exception.ValidationFailedException: Validation Failed:
1 changes have validation failures
cassandra is not a supported DB
Can I get come comment about that? Is this expected or not? What is the support state for cassandra, is it still supported?
I indeed tried also newest version 4.31.1, which does not work either, and even produce much more problems(missing libraries), so I’d like to make sure I cannot stay with 4.24.0. If you know though, how to build jar file with liquibase main entrypoint liquibase.integration.commandline.LiquibaseCommandLine ?
further examination: I found out, that including those maven dependencies does more damage than good. These completely poison dependency tree with conflicts. So this is not the way, I removed the building shaded jar file, and using liquibase 4.31.1 sdk only. This will work with given changeset mentioning cassandra, and will update oracle db. But this cannot be said for cassandra db — liquibase has problems with cassandra jars and to be hones atm I have no idea how to resolve it. I’m again hitting shading issues:
Unexpected error running Liquibase: com/datastax/oss/driver/shaded/guava/common/collect/ImmutableList
- Caused by: com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList
regardless how I try to avoid all shaded libraries in sdk lib directory. Does anyone know which libraries has to be added so that liquibase can handle cassandra? I tried these:
caffeine-3.2.0.jar
cassandra-jdbc-wrapper-4.15.0.jar
java-driver-core-4.19.0.jar
liquibase-cassandra-4.31.1.1.jar
another approach:
you can download currenct cassandra from Apache Download Mirrors
and take driver from there, but neither of these jars will contain java.lang.ClassNotFoundException: com.datastax.oss.driver.api.core.config.DriverOption
so you will not run liquibase using cassandra-jdbc-wrapper-4.14.0.jar with it.
Thanks!