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
麻烦指点,谢谢