0
votes

I am trying to run a flink steaming program that uses kafka connector(latest universal connector). The jobs runs without any problem on IntelliJ but when I am submitting the code build into jar using sbt package is giving me below error. java.lang.ClassNotFoundException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase

I also used the jar built using traditional IntellIJ option but still i get the above error.

1

1 Answers

1
votes

Most probably the issue is the fact that You are not including the dependencies in Your JAR file. Connector dependencies are not included in the Flink binary. Generally, the preferred way of tackling this issue is to use the proper plugin for Your build tool like shade-plugin for Maven or assembly for sbt to create so-called fat-jar i.e. the JAR with the dependencies included.