Exception in thread "main" java.lang.AbstractMethodError: org.apache.flink.streaming.api.graph..

Exception in thread “main” java.lang.AbstractMethodError: org.apache.flink.streaming.api.graph.StreamGraph.getJobGraph()Lorg/apache/flink/runtime/jobgraph/JobGraph;
at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:92)
at org.apache.flink.streaming.api.scala.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.scala:654)
at com.windows.FlinkSocketApplication01$.main(FlinkSocketApplication01.scala:22)
at com.windows.FlinkSocketApplication01.main(FlinkSocketApplication01.scala)

运行Flink程序报错:原因是因为在pom.xml中导入了client依赖。

<dependency>
	<groupId>org.apache.flinkgroupId>
	<artifactId>flink-scala_2.11artifactId>
	<version>1.7.2version>
dependency>

<dependency>
	<groupId>org.apache.flinkgroupId>
	<artifactId>flink-streaming-scala_2.11artifactId>
	<version>1.7.2version>
dependency>

<dependency>
	<groupId>org.apache.flinkgroupId>
	<artifactId>flink-clients_2.11artifactId>
	<version>1.6.1version>
dependency>

去除掉以下依赖即可:

<dependency>
	<groupId>org.apache.flinkgroupId>
	<artifactId>flink-clients_2.11artifactId>
	<version>1.6.1version>
dependency>

你可能感兴趣的:(Flink,系列)