1、报错信息
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:1947)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1848)
at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:69)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1834)
at org.apache.flink.streaming.api.scala.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.scala:801)
at com.streamxhub.streamx.flink.core.scala.StreamingContext.execute(FlinkStreaming.scala:73)
at com.streamxhub.streamx.flink.core.scala.StreamingContext.execute(FlinkStreaming.scala:67)
at com.streamxhub.streamx.flink.core.scala.StreamingContext.start(FlinkStreaming.scala:59)
at com.hopson.java.process.EtlDataProcessApp.main(EtlDataProcessApp.java:82)
2、解决方案
(1)在pom文件中添加依赖
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
(2)找到pom文件中的这行代码,注释掉它
<scope>provided</scope>