当前位置:网站首页>【flink】报错整理 Could not instantiate the executor. Make sure a planner module is on the classpath
【flink】报错整理 Could not instantiate the executor. Make sure a planner module is on the classpath
2022-07-30 19:17:00 【kiraraLou】
前言
Flink 版本 1.15.1
scala 版本 2.12
最近在学习 Flink
, 在 IDEA
中调试 Flink sql
代码时报错,报错内容如下:
Exception in thread "main" org.apache.flink.table.api.TableException: Could not instantiate the executor. Make sure a planner module is on the classpath
at org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:108)
at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:100)
at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:122)
at org.apache.flink.table.api.bridge.java.StreamTableEnvironment.create(StreamTableEnvironment.java:94)
at table.FlinkTableTest.main(FlinkTableTest.java:15)
Caused by: org.apache.flink.table.api.ValidationException: Multiple factories for identifier 'default' that implement 'org.apache.flink.table.delegation.ExecutorFactory' found in the classpath.
Ambiguous factory classes are:
org.apache.flink.table.planner.delegation.DefaultExecutorFactory
org.apache.flink.table.planner.loader.DelegateExecutorFactory
at org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:553)
at org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:105)
... 4 more
Process finished with exit code 1
POM 文件
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_2.12</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-loader</artifactId>
<version>${flink.version}</version>
</dependency>
问题原因
我们项目pom.xml
文件里面配置了两个解析器,这两个解析器不能同时并存,这里我们去掉 flink-table-planner_2.12
这个即可。
从 Flink 1.15 开始,发行版包含两个规划器:
flink-table-planner_2.12-1.15.1.jar
, in /opt, 包含查询规划器flink-table-planner-loader-1.15.1.jar
,默认加载/lib,包含隐藏在隔离类路径后面的查询计划器
注意: 两个规划器不能同时存在于类路径中。如果将它们都加载到/lib表作业中,则会失败。
问题解决!
参考:https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/dev/configuration/advanced/
边栏推荐
- Chapter 4 Controlling the Execution Flow
- The large-scale application of artificial intelligence AI products in industrial-grade mature shipping ports of CIMC World Lianda will create a new generation of high-efficiency smart ports and innova
- AI Basics: Graphical Transformer
- 基于inquirer封装一个控制台文件选择器
- requet.getHeader(“token“) 为null
- Common linked list problems and their Go implementation
- 实体中增加操作方法
- SimpleOSS第三方库libcurl与引擎libcurl错误解决方法
- AWS console
- MindSpore:【MindSpore1.1】Mindspore安装后验证出现cudaSetDevice failed错误
猜你喜欢
VS Code connects to SQL Server
浅聊对比学习(Contrastive Learning)第一弹
【剑指 Offer】剑指 Offer 22. 链表中倒数第k个节点
redis
The advanced version of the Niu Ke brushing series (team competition, sorting subsequences, inverting strings, deleting common characters, repairing pastures)
vxe-table实现复选框鼠标拖动选中
What is the difference between a cloud database and an on-premises database?
【Pointing to Offer】Pointing to Offer 18. Delete the node of the linked list
golang日志库zerolog使用记录
2种手绘风格效果比较,你更喜欢哪一种呢?
随机推荐
NXP IMX8QXP更换DDR型号操作流程
MindSpore:ImageFolderDataset数据读取问题
云数据库和本地数据库有什么区别?
The advanced version of the cattle brushing series (search for rotating sorted arrays, inversion of the specified range in the linked list)
Does the satellite phone communicate directly with the satellite or through a ground station?
一文读懂“语言模型”
Perfectly Clear QuickDesk & QuickServer图像校正优化工具
MindSpore:数据处理问题
看完《二舅》,我更内耗了
中集世联达工业级成熟航运港口人工智能AI产品规模化应用,打造新一代高效能智慧港口和创新数字港口,全球港航人工智能能领军者中集飞瞳
DM8:单库单实例搭建本地数据守护服务
SwiftUI iOS Boutique Open Source Project Complete Baked Food Recipe App based on SQLite (tutorial including source code)
kotlin by lazy
MindSpore:【Resolve node failed】解析节点失败的问题
在华为云,见证迷你世界的神奇觉醒
谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构
Scala学习:breakable
Listen to the boot broadcast
高并发秒杀项目总结
启动前台Activity