当前位置: 首页 > 知识库问答 >
问题:

检测到java.lang.NosuchMethodError错误,这可能是由于类路径上的Akka版本不兼容造成的。

余信然
2023-03-14

检测到java.lang.NosuchMethodError错误,这可能是由于类路径上的Akka版本不兼容造成的。请注意,给定的Akka版本必须在您正在使用的所有Akka模块中相同,例如,如果您使用akka-actor[2.5.4(从当前类路径解析)],所有其他核心Akka模块必须是相同的版本。外部项目如Alpakka、Persistence插件或Akka HTTP等都有自己的版本号--请确保您使用的是一组兼容的库。

线程[my-system-akka.actor.default-dispatcher-5]:Akka.actor.actorcell.addFunctionRef(Lscala/function2;)Lakka/actor/functionRef;关闭JVM,因为'akka.jvm-exit-on-fatal-error'已为actorSystem[my-system]java.lang.nosuchmethoderror:akka.actor.actorcell.addFunctionRef启用,alkka/actor/functionRef;在Akka.stream.stage.GraphStageLogic$StageActor.(GraphStage.scala:142)在Akka.stream.stage.graphStageLogic.GetStageActor(GraphStage.scala:956)在Akka.stream.impl.io.ConnectionSourceStage$$Anon$2.在Akka.stream.impl.fusing.graphInterper.init(GraphStages.scala:60)在在Akka.stream.impl.actorgraphraphinterprestart(actorgraphinterprestart(actor.scala:586),在Akka.stream.impl.fusing.actorgraphinterprestart(actor.scala:522),在Akka.stream.impl.fusing.actorgraphinterprestart(actorgraphinterprester.scala:529),在Akka.actor.actorcell.create(actorgraphinterprestart(actorgraphinterprestart ch.mailbox.run(mailbox.scala:223)在Akka.dispatch.mailbox.exec(mailbox.scala:234)在Akka.dispatch.forkjoin.forkjoinask.doexec(forkjoinask.java:260)在Akka.dispatch.forkjoinpool$workqueue.runtask(forkjoinpool.java:1339)在Akka.dispatch.forkjoinpool.java:1339)在Akka.dispatch.forkjoinpool.runworker(

共有1个答案

吕俊才
2023-03-14
include transitive dependency on akka-stream
    "com.typesafe.akka" %% "akka-http" % "10.0.10",
    "com.typesafe.akka" %% "akka-actor" % "2.5.4",
    "com.typesafe.akka" %% "akka-stream" % "2.5.4",
    "com.typesafe.akka" %% "akka-http-spray-json" % "10.0.10"
 类似资料: