Reputation: 1727
I'm using Kafka as data source for Flink job. When I'm deploying job to flink cluster job manager I'm receiving an error ClassNotFoundException: Caused by: java.lang.ClassNotFoundException: org.apache.flink.connector.kafka.source.KafkaSource
Below is my pom.xml dependancies
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka_2.12</artifactId>
<version>1.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-avro</artifactId>
<version>1.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_2.12</artifactId>
<version>1.13.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>
Upvotes: 0
Views: 5675
Reputation: 823
Flink connector is not under the flink classpath by default, you need to add the kafka connector maven dependency into your project
Upvotes: -1
Reputation: 344
Flink itself does not contain these extension JAR files (u can find jar file in flink/lib ), If you do not enter these jars into your project's JAR file(uber jar), or specify them when submitting the task (see the Flink documentation), flink runtime will not find these Jars.
Upvotes: 4