Hi Guys, I have created a project with Maven to try to send data from Kafka to Flink. But when i try to build the project i have the following error : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project processing-app: Compilation failure: Compilation failure: [ERROR] /env/mvn/test-0.0.1/processing-app/src/main/java/com/test/alpha/ReadFromKafka.java:[24,51] package org.apache.flink.streaming.connectors.kafka does not exist [ERROR] /env/mvn/test-0.0.1/processing-app/src/main/java/com/test/alpha/ReadFromKafka.java:[52,63] cannot find symbol [ERROR] symbol: class FlinkKafkaConsumer011 Here is my "pom.xml" configuration for Flink Kafka connector : <flink.version>1.4.2</flink.version> <java.version>1.8</java.version> <scala.binary.version>2.11</scala.binary.version> <maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.target>${java.version}</maven.compiler.target> <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-connector-kafka-0.11_${scala.binary.version}</artifactId> <version>${flink.version}</version> </dependency> And here is the import line in my java file : Can anyone could help me with this issue ? Regards, Sebastien |
Hi Sebastien, You need to add the dependency under a “dependencies” section, like so: <dependencies> <dependency>…<dependency> <dependencies> I would also recommend using the Flink quickstart Maven templates [1], as they already have a well defined Maven project skeleton for Flink jobs.
Cheers, Gordon On 19 April 2018 at 10:17:11 PM, Lehuede sebastien ([hidden email]) wrote:
|
Free forum by Nabble | Edit this page |