Mathias Ritter
09/07/2023, 10:17 AMflink-connector-cassandra_2.12) but my pipeline gets stuck after the first object is written into Cassandra. Upon using the debugger, I discovered that the following exception is thrown:
java.lang.IncompatibleClassChangeError: Class com.datastax.driver.core.DefaultResultSetFuture does not implement the requested interface org.apache.flink.cassandra.shaded.com.google.common.util.concurrent.ListenableFuture
I am using flink version 1.16.0 and the datastax driver (com.datastax.cassandra) version 3.11.4 . Any idea why this is happening / how to fix this?Aleksandr Pilipenko
09/07/2023, 2:47 PMMathias Ritter
09/07/2023, 2:57 PMcassandra-driver-extras as I want to use some of the extra codecs. I realised that this dependency also pulls in the core driver, so I fixed the above exception by excluding core as follos:
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-extras</artifactId>
<version>3.11.2</version>
<exclusions>
<exclusion>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</exclusion>
</exclusions>
</dependency>
That fixed the initial exception. However, I now have a new issue with using com.datastax.driver.extras.codecs.enums.EnumNameCodec . I am getting the following exception:
java.lang.NoSuchMethodError: 'void com.datastax.driver.core.TypeCodec.<init>(com.datastax.driver.core.DataType, com.google.common.reflect.TypeToken)'
at com.datastax.driver.extras.codecs.ParsingCodec.<init>(ParsingCodec.java:55)
at com.datastax.driver.extras.codecs.ParsingCodec.<init>(ParsingCodec.java:51)
at com.datastax.driver.extras.codecs.enums.EnumNameCodec.<init>(EnumNameCodec.java:39)
at com.datastax.driver.extras.codecs.enums.EnumNameCodec.<init>(EnumNameCodec.java:35)
I noticed that TypeCodec is part of core whereas ParsingCodec is part of extras. Could this be caused by a version mismatch? How can I find out what core version the connector includes?Aleksandr Pilipenko
09/07/2023, 3:13 PMCould this be caused by a version mismatch?I suspect that this is also due to relocated guava in the connector - method signature will change to
void com.datastax.driver.core.TypeCodec.<init>(com.datastax.driver.core.DataType, <http://org.apache.flink.cassandra.shaded.com|org.apache.flink.cassandra.shaded.com>.google.common.reflect.TypeToken) (notice change in fully classified name of the second parameter type).
Based on this, I’m not sure how to use cassandra-driver-extras with this connector. Maybe someone more closely familiar with cassandra connector can help here.Martijn Visser
09/07/2023, 5:36 PMMathias Ritter
09/07/2023, 5:39 PMMartijn Visser
09/07/2023, 5:49 PM