0
点赞
收藏
分享

微信扫一扫

【Flink】报错-No ExecutorFactory found to execute the application

谁知我新 2022-02-22 阅读 173

现象

使用flink-1.14.3报错

Exception in thread "main" java.lang.IllegalStateException: No ExecutorFactory found to execute the application.
	at org.apache.flink.core.execution.DefaultExecutorServiceLoader.getExecutorFactory(DefaultExecutorServiceLoader.java:88)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:2032)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1930)
	at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:69)
	at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1916)
	at com.cnn.studyflink.stream.TestFlinkStreamFromSocket.main(TestFlinkStreamFromSocket.java:48)

原因

依赖如下,自1.11.0版本之后,需要引入flink-clients,成功执行。

<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-java</artifactId>
  <version>1.14.3</version>
</dependency>
<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-streaming-java_2.12</artifactId>
  <version>1.14.3</version>
</dependency>
<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>_2.12</artifactId>
  <version>${flink.version}</version>
</dependency>
举报

相关推荐

0 条评论