【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。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

前言

  • 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/文章来源地址https://www.toymoban.com/news/detail-504880.html

到了这里,关于【flink】报错整理 Could not instantiate the executor. Make sure a planner module is on the classpath的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • idea运行单元测试报Could not find method on interface org.apache.ibatis.executor.Executor named queryCursor

    出现上面的问题是由于idea插件MyBatis Log EasyPlus导致产生的 直接关闭掉这个插件,就能正常运行了 org.apache.ibatis.exceptions.PersistenceException:  ### Error opening session.  Cause: org.apache.ibatis.plugin.PluginException: Could not find method on interface org.apache.ibatis.executor.Executor named queryCursor. Cause: java

    2024年04月28日
    浏览(35)
  • Flink报错:Could not connect to BlobServer at address localhost/127.0.0.1:39203

    Flink报错:Could not connect to BlobServer at address localhost/127.0.0.1:39203 个人使用1.15.3的单节点测试发现是jobmanager-bind-host的参数问题 对flink-conf.yaml的jobmanager-bind-host 进行修改 standlone模式注释掉,或者设置0.0.0.0 YARN上,如果设置为 localhost ,这个设置将被忽略,默认为0.0.0.0。 Kubernet

    2024年02月16日
    浏览(33)
  • flink写mysql报错Could not retrieve transation read-only status server

    事务隔离级别前提下还是报错 SET GLOBAL tx_isolation=\\\'READ-COMMITTED\\\';    show global variables like \\\'wait timeout\\\'; 发现mysql是8小时。如果flnk超过8小时没有发送数据,invoke将会导致 mysql主动断开连接,而java侧并无感知。 解决问题,在使用connect前,判断当前connect是否可用。 不可用重新创建

    2024年02月07日
    浏览(30)
  • 【Android Studio】安装app报错Installation did not succeed. The application could not be installed: INSTALL

    安装app demo报错;app安装不上 Installation did not succeed. The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE The device needs more free storage to install the application (extra space is needed in addition to APK size). 程序或手机内存空间不足 清理程序内存:Build - Clean Project 清理手机内存:清理多

    2024年02月07日
    浏览(48)
  • git报错The project you were looking for could not be found 解决方式

    一、拉代码报错The project you were looking for could not be found 问题描述: 使用git从远程仓库克隆项目到本地的时候。 出现这个问题:The project you were looking for could not be found. 原因分析: 你的账号没有项目的权限,你可以在浏览器输入你的项目地址,如果可以进入,则说明有权限;

    2024年02月04日
    浏览(50)
  • unity 发布报错 The type or namespace name `UnityEditor‘ could not be found.

    引用了UnityEditor的内容,发布当然会报错啦 加上宏判断就好啦

    2024年02月12日
    浏览(37)
  • 关于Could not find a version that satisfies the requirement报错的解决方案

    在使用python的pip命令安装各类package时,命令运行后会分3次返回警告类信息: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by \\\'ConnectTimeoutError(pip._vendor.requests.packages.urllib3. connection.VerifiedHTTPSConnection object at 0x00000218CA6213C8, \\\'Connection to pypi.python.org timed out

    2024年02月02日
    浏览(45)
  • VS2013报错The request was aborted: Could not create SSL/TLS secure channel.

    The request was aborted: Could not create SSL/TLS secure channel.Please click here to retry the request. 由于出现以下错误,无法建立与服务器的连接: 请求被中止:无法创建SSL/TLS安全通道。 请单击此处重试请求。 进入Visual Studio 2013 (这里就简称VS2013了)后,从工具-扩展和更新(U)...,进入界面后,

    2024年02月11日
    浏览(52)
  • Linux|操作系统|Error: Could not create the Java Virtual Machine 报错的解决思路

    现在都流行kubernetes这样的云原生了,因此,很多Java微服务也都集成到类似kubernetes这样的环境下了,毫无疑问的,kubernetes会省去很多环境问题,而最近在部署一个二进制Java项目的时候,遇到了Error: Could not create the Java Virtual Machine 这样的报错 虽然很多年前也遇到过这样的问

    2024年01月24日
    浏览(44)
  • pip selenium 报错 could not find a version that satisfies the requirement selenium——解决

    在使用pip安装selenium时报错 EEROR :could not find a version that satisfies the requirement selenium 其实WARNING中已经把解决方案写出来。只要在之前的语句后面再加上    --trusted-host mirrors.aliyun.com    就可以了。(注意:因为这里我使用的aliyun的代理,所有这里是aliyun,如果你们使用的是其

    2024年02月12日
    浏览(44)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包