Flink 一个 依赖 引起的错误 JobGraph。

错误如下 :

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.flink.optimizer.plantranslate.JobGraphGenerator.addUserArtifactEntries(Ljava/util/Collection;Lorg/apache/flink/runtime/jobgraph/JobGraph;)V
	at org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:183)
	at org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:104)
	at org.apache.flink.streaming.api.graph.StreamGraph.getJobGraph(StreamGraph.java:777)
	at org.apache.flink.streaming.api.graph.StreamGraphTranslator.translateToJobGraph(StreamGraphTranslator.java:52)
	at org.apache.flink.client.FlinkPipelineTranslationUtil.getJobGraph(FlinkPipelineTranslationUtil.java:43)
	at org.apache.flink.client.deployment.executors.LocalExecutor.getJobGraph(LocalExecutor.java:98)
	at org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:79)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1740)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1641)
	at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:74)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1627)
	at com.gongzhugou.realtime.commmon.StreamBaseEnvironment.execute(StreamBaseEnvironment.java:128)
	at com.gongzhugou.realtime.commmon.StreamBaseEnvironment.start(StreamBaseEnvironment.java:38)
	at com.gongzhugou.realtime.flink.product.ProductSaleVolume.main(ProductSaleVolume.java:43)ava

在这里插入图片描述

原因

Flink 中引入下面的依赖。 删除掉就好了。

  <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-clients_${scala.binary.version}</artifactId>
      <version>${flink.version}</version>
  </dependency>

原因是 因为这个包在其他的里面已经存在, 比如下面的这个包中就存在。

<groupId>org.apache.flink</groupId>
	<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
<version>${flink.version}</version>

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值