【问题标题】:flink with scala and maven error in IDE eclipseflink 在 IDE eclipse 中出现 scala 和 maven 错误
【发布时间】:2016-09-05 22:46:12
【问题描述】:

我使用文档创建了这个示例程序 https://ci.apache.org/projects/flink/flink-docs-release-0.8/programming_guide.html#introduction

在 IDE 中运行时出现以下错误

log4j:WARN No appenders could be found for logger (org.apache.flink.api.scala.ClosureCleaner$).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.RuntimeException: An error occurred while loading the local executor (org.apache.flink.client.LocalExecutor).
    at org.apache.flink.api.common.PlanExecutor.createLocalExecutor(PlanExecutor.java:161)
    at org.apache.flink.api.java.LocalEnvironment.startNewSession(LocalEnvironment.java:122)
    at org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:81)
    at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:855)
    at org.apache.flink.api.java.DataSet.collect(DataSet.java:410)
    at org.apache.flink.api.java.DataSet.print(DataSet.java:1605)
    at org.apache.flink.api.scala.DataSet.print(DataSet.scala:1615)
    at com.sc.edl.flink.ingestion$.main(ingestion.scala:27)
    at com.sc.edl.flink.ingestion.main(ingestion.scala)
Caused by: java.lang.NoSuchMethodException: org.apache.flink.client.LocalExecutor.<init>(org.apache.flink.configuration.Configuration)
    at java.lang.Class.getConstructor0(Class.java:3082)
    at java.lang.Class.getConstructor(Class.java:1825)
    at org.apache.flink.api.common.PlanExecutor.createLocalExecutor(PlanExecutor.java:158)

谁能告诉我哪里出了问题。

提前致谢

【问题讨论】:

    标签: scala maven apache-flink


    【解决方案1】:

    该文档页面适用于 0.8 版。使用更新版本重试(1.1.2 是最新版本)。

    无论如何,问题可能与您在 Eclipse 中使用的类路径有关。您需要从 Eclipse 更改它并使用我相信的 assembly 模块。在最近的版本中,正确的模块称为mainRunner

    【讨论】:

      猜你喜欢
      • 2021-01-29
      • 2016-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-21
      • 2020-08-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多