日常Exception第三十三回:Flink运行jar包报错NoSuchMethodError: org.apache.flink.api.common.functions.Runtime....

Posted 善良勤劳勇敢而又聪明的老杨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了日常Exception第三十三回:Flink运行jar包报错NoSuchMethodError: org.apache.flink.api.common.functions.Runtime....相关的知识,希望对你有一定的参考价值。

1、异常信息

主要报错内容:

java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;

报错全量信息:

java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:765) ~[?:?]
        at ***.***.***.***.source.KafkaSource.run(KafkaSource.java:26) ~[?:?]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
2022-10-21 18:12:29,360 INFO  org.apache.flink.runtime.executiongraph.failover.flip1.RestartPipelinedRegionFailoverStrategy [] - Calculating tasks to restart to recover the
 failed task cbc357ccb763df2852fee8c4fc7d55f2_0.
2022-10-21 18:12:29,360 INFO  org.apache.flink.runtime.executiongraph.failover.flip1.RestartPipelinedRegionFailoverStrategy [] - 2 tasks should be restarted to recover the 
failed task cbc357ccb763df2852fee8c4fc7d55f2_0.
2022-10-21 18:12:29,360 INFO  org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - Job xxx Monitor xxx (128649ece7bccf556516a66f7b48976c) switched from 
state RUNNING to FAILING.
org.apache.flink.runtime.JobException: Recovery is suppressed by NoRestartBackoffTimeStrategy
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138) ~[flink-dist_2.11-1.14.5.jar:1.14.
5]
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82) ~[flink-dist_2.11-1.14.5
.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:252) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:242) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:233) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:684) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.SchedulerNG.updateTaskExecutionState(SchedulerNG.java:79) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:444) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:316) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14
.5]
        at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f484
2d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:314) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:217) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:78) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.
5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:163) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction.applyOrElse(PartialFunction.scala:123) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.Actor.aroundReceive(Actor.scala:537) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.Actor.aroundReceive$(Actor.scala:535) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.ActorCell.invoke(ActorCell.scala:548) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.run(Mailbox.scala:231) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.exec(Mailbox.scala:243) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_181]
Caused by: java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:765) ~[?:?]
        at ***.***.xxx_xxx.source.KafkaSource.run(KafkaSource.java:26) ~[?:?]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
2022-10-21 18:12:29,364 INFO  org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - KeyedProcess -> (Sink: Unnamed, Sink: Unnamed) (1/1) (4013f40db248a55105e318
604a6a7eee) switched from INITIALIZING to CANCELING.
2022-10-21 18:12:30,117 INFO  org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - KeyedProcess -> (Sink: Unnamed, Sink: Unnamed) (1/1) (4013f40db248a55105e318
604a6a7eee) switched from CANCELING to CANCELED.
2022-10-21 18:12:30,118 INFO  org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - Job xxx Monitor xxx (128649ece7bccf556516a66f7b48976c) switched from 
state FAILING to FAILED.
org.apache.flink.runtime.JobException: Recovery is suppressed by NoRestartBackoffTimeStrategy
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138) ~[flink-dist_2.11-1.14.5.jar:1.14.
5]
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82) ~[flink-dist_2.11-1.14.5
.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:252) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:242) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:233) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:684) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.scheduler.SchedulerNG.updateTaskExecutionState(SchedulerNG.java:79) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:444) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:316) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14
.5]
        at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f484
2d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:314) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:217) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:78) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.
5]
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:163) ~[flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction.applyOrElse(PartialFunction.scala:123) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.Actor.aroundReceive(Actor.scala:537) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.Actor.aroundReceive$(Actor.scala:535) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.actor.ActorCell.invoke(ActorCell.scala:548) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.run(Mailbox.scala:231) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at akka.dispatch.Mailbox.exec(Mailbox.scala:243) [flink-rpc-akka_62bf5cf3-13d9-4b44-894f-1ca8f4842d31.jar:1.14.5]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_181]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_181]
Caused by: java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:765) ~[?:?]
        at ***.***.xxx_xxx.source.KafkaSource.run(KafkaSource.java:26) ~[?:?]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
        at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323) ~[flink-dist_2.11-1.14.5.jar:1.14.5]
2022-10-21 18:12:30,119 INFO  org.apache.flink.runtime.checkpoint.CheckpointCoordinator    [] - Stopping checkpoint coordinator for job 128649ece7bccf556516a66f7b48976c.
2022-10-21 18:12:30,121 INFO  org.apache.flink.runtime.resourcemanager.slotmanager.DeclarativeSlotManager [] - Clearing resource requirements of job 128649ece7bccf556516a66
f7b48976c
2022-10-21 18:12:30,122 INFO  org.apache.flink.runtime.dispatcher.StandaloneDispatcher     [] - Job 128649ece7bccf556516a66f7b48976c reached terminal state FAILED.
org.apache.flink.runtime.JobException: Recovery is suppressed by NoRestartBackoffTimeStrategy
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138)
        at org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82)
        at org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:252)
        at org.apache.flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:242)
        at org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:233)
        at org.apache.flink.runtime.scheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:684)
        at org.apache.flink.runtime.scheduler.SchedulerNG.updateTaskExecutionState(SchedulerNG.java:79)
        at org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:444)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:316)
        at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:314)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:217)
        at org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:78)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:163)
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
        at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20)
        at scala.PartialFunction.applyOrElse(PartialFunction.scala:123)
        at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122)
        at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
        at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
        at akka.actor.Actor.aroundReceive(Actor.scala:537)
        at akka.actor.Actor.aroundReceive$(Actor.scala:535)
        at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580)
        at akka.actor.ActorCell.invoke(ActorCell.scala:548)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
        at akka.dispatch.Mailbox.run(Mailbox.scala:231)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
        at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:765)
        at ***.***.xxx_xxx.source.KafkaSource.run(KafkaSource.java:26)
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110)
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67)
        at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323)


2、解决方式

原因:升级后使用的flink安装版本是1.14.5,而我的jar包中是使用的1.13.2

解决:将jar包中的pom中flink的依赖版本,也换成1.14.5,与服务器上的flink版本一致,即可正常启动啦!!

以上是关于日常Exception第三十三回:Flink运行jar包报错NoSuchMethodError: org.apache.flink.api.common.functions.Runtime....的主要内容,如果未能解决你的问题,请参考以下文章

日常Exception第三十回:Flink异常NoResourceAvailableException: Could not acquire the minimum required resour

日常Exception第三十回:Flink异常NoResourceAvailableException: Could not acquire the minimum required resour

日常Exception第三十回:Flink异常NoResourceAvailableException: Could not acquire the minimum required resour

日常Exception第二十三回:Maven导入异常Maven dependencies are failing with a 501 error: user https://repo.maven

一起talk C栗子吧(第一百三十三回:C语言实例--创建进程时的内存细节)

一起Talk Android吧(第四百三十三回:Java8中的日期时间类)