flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From domi...@dbruhn.de
Subject Flink 1.4 with cassandra-connector: Shading error
Date Mon, 18 Dec 2017 14:07:43 GMT
Hey everyone,
I'm trying to migrate one of my jobs to Flink 1.4 and I'm running into a 
classpath/shading error.

What happens is that when Flink calls into Cluster.connect(), somewhere 
down in the stream, the cassandra library tries to initialize Netty, and 
I'm getting the following exception:

Caused by: java.lang.AssertionError: Cannot locate Netty classes in the 
Full exception here:

I think this can be explained very easily:
1. The flink-cassandra-connector-1.4 jar contains the Datastax Cassandra 
driver inside
2. The flink-cassandra-connector-1.4 jar contains a shaded (to 
org.apache.flink.cassandra.shaded.io.netty) netty
3. The DataStax driver executes the following code when it initializes 
netty (in NettyUtils starting line 58):

  try {
             Class.forName(String.format("%s.%s.channel.Channel", "io", 
             shaded = false;
         } catch (ClassNotFoundException var9) {
             try {
                 shaded = true;
             } catch (ClassNotFoundException var8) {
                 throw new AssertionError("Cannot locate Netty classes in 
the classpath:" + var8);

Neither of the two packages (io.netty.channel and 
com.datastax.shaded.netty.channel.Channel) are available and the shaded 
one from Flink is not in the list and is never used here.

My question: Did anyone ever use the cassandra connector on 1.4. As it 
looks to me it is completely broken and can never work. But maybe I'm 
failing to see something. I don't include netty in my dependencies, that 
could of course fix it, but I'm suspecting I will run into more 
dependency problems then.

Here are my dependencies:

What additional information can I provide?


View raw message