0
votes

I'm getting a runtime exception in the cassandra sink related code:

07/16/2018 17:09:48 Job execution switched to status FAILING.
java.lang.NoSuchMethodError: com.datastax.driver.core.BoundStatement.set(ILjava/lang/Object;Lorg/apache/flink/cassandra/shaded/com/google/common/reflect/TypeToken;)Lcom/datastax/driver/core/BoundStatement;

I have another dependency which also uses the datastax driver along with the cassandra-flink connector.

I tried to exclude the datastax driver from the flink cassandra connector but it didn't work as expected

My SBT dependency looks like this:

val datafeedsDeltaStreamDeps: Seq[ModuleID] = commonDependencies ++ flinkDeps ++ Seq(

    "org.apache.flink" %% "flink-connector-cassandra" % "1.4.1"  excludeAll ExclusionRule(organization = "com.datastax"), <<< I tried to exclude the data stax from the flink cassandra connector

    "com.dy.productfeed" %% "feedsinterface" % "0.4.0", << this also has a cassandra dependency in it
    CommonDependencies.statsdClient
  )

But I still see the "cassandra" driver under the flink package

enter image description here

1

1 Answers

3
votes

DataStax library is shaded in Flink-Cassandra-connector.jar so you couldn't exclude that. If you need a specific DataStax version you can build Flink source against that version using the command:

directory: flink-connectors/flink-connector-cassandra
command: mvn package -Ddriver.version=3.1.4