flink1.11报错:java.lang.IllegalStateException: No ExecutorFactory found to execute the application(代码片

Posted 半字浅眉

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了flink1.11报错:java.lang.IllegalStateException: No ExecutorFactory found to execute the application(代码片相关的知识,希望对你有一定的参考价值。

一. 报错信息

Exception in thread "main" java.lang.IllegalStateException: No ExecutorFactory found to execute the application.
    at org.apache.flink.core.execution.DefaultExecutorServiceLoader.getExecutorFactory(DefaultExecutorServiceLoader.java:84)
    at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1803)
    at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1713)
    at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:74)
    at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1699)
    at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1681)
    at org.apache.flink.streaming.api.scala.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.scala:688)

二.报错原因

flink1.11版本,移除了flink-streaming-java 对 flink-clients 的依赖,需要手动加入clients依赖。

三.解决方法

在 pom 文件中手动添加依赖即可:

<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-clients_2.12</artifactId>
    <version>1.11.3</version>
</dependency>

 

以上是关于flink1.11报错:java.lang.IllegalStateException: No ExecutorFactory found to execute the application(代码片的主要内容,如果未能解决你的问题,请参考以下文章

Java 诊断工具 Arthas-实操案例

Flink1.11+Hive批流一体数仓

Flink1.11+Hive批流一体数仓

flinkFlink源码编译:Flink1.11+版本编译及部署

Tomcat 9 无效的密钥库密码

Flink SQL 1.11 流批一体 Hive 数仓