david_chen1 2022-04-04 22:57 采纳率: 100%
浏览 198
已结题

Flink Java 运行WordCount程序报错

pom.xml 主要配置如下:

    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-java</artifactId>
      <version>1.13.6</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.36</version>
      <scope>provided</scope>
    </dependency>

在运行wordcount时报以下错误
"C:\Program Files\Java\jdk1.8.0_291\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.4\lib\idea_rt.jar=55423:C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_291\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\rt.jar;C:\Users\Administrator.m2\repository\org\apache\flink;C:\Users\Administrator.m2\repository\org\apache\flink\flink-clients_2.12\1.9.2\flink-clients_2.12-1.9.2.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-clients_2.12\1.9.2\flink-clients_2.12-1.9.2-sources.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-clients_2.12\1.9.2\flink-clients_2.12-1.9.2-javadoc.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-core\1.10.0\flink-core-1.10.0.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-hadoop-fs\1.10.0\flink-hadoop-fs-1.10.0.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-java\1.10.0\flink-java-1.10.0.jar;C:\Users\Administrator.m2;C:\Apache\flink-1.14.0\lib\flink-csv-1.14.0.jar;C:\Apache\flink-1.14.0\lib\flink-dist_2.11-1.14.0.jar;C:\Apache\flink-1.14.0\lib\flink-json-1.14.0.jar;C:\Apache\flink-1.14.0\lib\flink-shaded-zookeeper-3.4.14.jar;C:\Apache\flink-1.14.0\lib\flink-table_2.11-1.14.0.jar;D:\hadoop-3.2.2\share\hadoop\client;D:\hadoop-3.2.2\share\hadoop\common;D:\hadoop-3.2.2\share\hadoop\hdfs;D:\hadoop-3.2.2\share\hadoop\mapreduce;D:\hadoop-3.2.2\share\hadoop\tools;D:\hadoop-3.2.2\share\hadoop\yarn;C:\Users\Administrator\selfstudy-flink\target\classes;C:\Apache\flink-1.9.1\lib\flink-dist_2.12-1.9.1.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-java\1.13.6\flink-java-1.13.6.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-core\1.13.6\flink-core-1.13.6.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-annotations\1.13.6\flink-annotations-1.13.6.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-metrics-core\1.13.6\flink-metrics-core-1.13.6.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-shaded-asm-7\7.1-13.0\flink-shaded-asm-7-7.1-13.0.jar;C:\Users\Administrator.m2\repository\com\esotericsoftware\kryo\kryo\2.24.0\kryo-2.24.0.jar;C:\Users\Administrator.m2\repository\com\esotericsoftware\minlog\minlog\1.2\minlog-1.2.jar;C:\Users\Administrator.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\Administrator.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\Administrator.m2\repository\org\apache\commons\commons-compress\1.21\commons-compress-1.21.jar;C:\Users\Administrator.m2\repository\org\apache\flink\flink-shaded-guava\18.0-13.0\flink-shaded-guava-18.0-13.0.jar;C:\Users\Administrator.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\Administrator.m2\repository\org\apache\commons\commons-math3\3.5\commons-math3-3.5.jar;C:\Users\Administrator.m2\repository\org\slf4j\slf4j-api\1.7.15\slf4j-api-1.7.15.jar;C:\Users\Administrator.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\Administrator.m2\repository\org\apache\flink\force-shading\1.13.6\force-shading-1.13.6.jar;C:\Users\Administrator.m2\repository\org\slf4j\slf4j-reload4j\1.7.36\slf4j-reload4j-1.7.36.jar;C:\Users\Administrator.m2\repository\ch\qos\reload4j\reload4j\1.2.19\reload4j-1.2.19.jar" com.selfstudy.BatchJob
[org.apache.flink.api.java.ExecutionEnvironment]-The job has 0 registered types and 0 default Kryo serializers
[org.apache.flink.api.java.ExecutionEnvironment]-Registered Kryo types: []
[org.apache.flink.api.java.ExecutionEnvironment]-Registered Kryo with Serializers types: []
[org.apache.flink.api.java.ExecutionEnvironment]-Registered Kryo with Serializer Classes types: []
[org.apache.flink.api.java.ExecutionEnvironment]-Registered Kryo default Serializers: []
[org.apache.flink.api.java.ExecutionEnvironment]-Registered Kryo default Serializers Classes []
[org.apache.flink.api.java.ExecutionEnvironment]-Registered POJO types: []
[org.apache.flink.api.java.ExecutionEnvironment]-Static code analysis mode: DISABLE
Exception in thread "main" java.lang.AbstractMethodError: org.apache.flink.client.deployment.executors.LocalExecutor.execute(Lorg/apache/flink/api/dag/Pipeline;Lorg/apache/flink/configuration/Configuration;)Ljava/util/concurrent/CompletableFuture;
at org.apache.flink.api.java.ExecutionEnvironment.executeAsync(ExecutionEnvironment.java:944)
at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:860)
at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:844)
at org.apache.flink.api.java.DataSet.collect(DataSet.java:413)
at org.apache.flink.api.java.DataSet.print(DataSet.java:1652)
at com.selfstudy.BatchJob.main(BatchJob.java:28)

Process finished with exit code 1
麻烦指点,谢谢

  • 写回答

2条回答 默认 最新

  • 吕布辕门 后端领域新星创作者 2022-04-11 08:14
    关注

    本地执行需要去掉,依赖范围provided,可以查看我的微博,flink专栏

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 5月4日
  • 已采纳回答 4月26日
  • 创建了问题 4月4日

悬赏问题

  • ¥60 优博讯DT50高通安卓11系统刷完机自动进去fastboot模式
  • ¥15 minist数字识别
  • ¥15 在安装gym库的pygame时遇到问题,不知道如何解决
  • ¥20 uniapp中的webview 使用的是本地的vue页面,在模拟器上显示无法打开
  • ¥15 网上下载的3DMAX模型,不显示贴图怎么办
  • ¥15 关于#stm32#的问题:寻找一块开发版,作为智能化割草机的控制模块和树莓派主板相连,要求:最低可控制 3 个电机(两个驱动电机,1 个割草电机),其次可以与树莓派主板相连电机照片如下:
  • ¥15 Mac(标签-IDE|关键词-File) idea
  • ¥15 潜在扩散模型的Unet特征提取
  • ¥15 iscsi服务无法访问,如何解决?
  • ¥15 感应式传感器制作的感应式讯响器