Closed dinchand closed 1 year ago
@dinchand, good news for the fix 😄
Liquibase compliance mode is strongly recommended to avoid some unexpected behaviours happening in some scenarios (for example, creating a table and populating it immediately after will fail without the Liquibase compliance mode).
Also, it seems you're trying to run classic Liquibase for SQL here because the query is not valid CQL (varchar(N)
does not exist in CQL, explaining the parsing error). Are you using Liquibase Cassandra? Because, as you can see here in the Liquibase Cassandra code, the syntax of the query creating the table DATABASECHANGELOG is different.
An example of integration in a Spring application is available here: https://github.com/liquibase/liquibase-cassandra/issues/212#issuecomment-1741795280. Also, I already successfully ran the standard example provided in the Liquibase documentation as you could see in the issue #25.
I hope a new version of Liquibase Cassandra will be released soon with this JDBC wrapper (since changes have been merged in their main branch few weeks ago: https://github.com/liquibase/liquibase-cassandra/pull/205)
@maximevw Again thanks for the clear explanations and pointers. I was indeed missing the Liquibase Cassandra as dependency.
Also after you suggested I tried using the latest Liquibase Cassandra. And now I hit
[2023-11-01 17:02:30] SEVERE [liquibase.ext] Could not get keyspace from connection
java.lang.ClassCastException: com.datical.liquibase.ext.database.jvm.ProJdbcConnection cannot be cast to com.ing.data.cassandra.jdbc.CassandraConnection
at liquibase.ext.cassandra.database.CassandraDatabase.getKeyspace(CassandraDatabase.java:114)
at liquibase.ext.cassandra.database.CassandraDatabase.getDefaultCatalogName(CassandraDatabase.java:136)
at liquibase.database.AbstractJdbcDatabase.getLiquibaseCatalogName(AbstractJdbcDatabase.java:710)
at liquibase.ext.cassandra.lockservice.LockServiceCassandra.getChangeLogLockTableName(LockServiceCassandra.java:197)
at liquibase.ext.cassandra.lockservice.LockServiceCassandra.isLocked(LockServiceCassandra.java:183)
Possibly because the the CassandraConnection is an implementation of java.sql.Connection but liquibase has its own interface.
Hello @dinchand,
Indeed, the latest version of Liquibase Cassandra (4.24.0) still relies on Simba JDBC driver, that's certainly why you got this cast exception.
You currently have the following alternative:
As this is not an issue directly related to the JDBC wrapper for Cassandra, I'll transform into a discussion.
@maximevw Firstly Thanks for the release 4.10.2 which fixed my previous issue.
However I now encounter a new one . When I run it I now get
I did read about the compliance mode and https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/25 . I am not sure if all liquibase users should use that compliance mode. I tried with that as well but no luck. Any pointers ?