空手道加特林计划-AbstractMethodError

时间:2019-03-20 13:55:18

标签: gatling karate

我正在Gatling版本3.0.3下运行空手道gatling示例程序。 我想致电KarateProtocol时遇到此错误。

val pro = karateProtocol() val auth = censing(“ custom”)。exec(karateFeature(“ classpath:mock / AuthenticateUser.feature”))

16:20:30.269 [ERROR]例如Gatling $-运行崩溃 java.lang.AbstractMethodError:com.intuit.karate.gatling.KarateProtocol $$ anon $ 1.newComponents(Lio / gatling / core / CoreComponents;)Lscala / Function1;         在io.gatling.core.protocol.ProtocolComponentsRegistry。$ anonfun $ components $ 1(Protocol.scala:68)中         在scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)         在io.gatling.core.protocol.ProtocolComponentsRegistry.componentsFactory $ 1(Protocol.scala:68)         在io.gatling.core.protocol.ProtocolComponentsRegistry.comps $ 1(Protocol.scala:70)         在io.gatling.core.protocol.ProtocolComponentsRegistry。$ anonfun $ components $ 4(Protocol.scala:72)         在scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)         在io.gatling.core.protocol.ProtocolComponentsRegistry.components(Protocol.scala:72)         在com.intuit.karate.gatling.KarateActionBuilder.build(KarateActionBuilder.scala:9)         在io.gatling.core.structure.StructureBuilder。$ anonfun $ build $ 1(StructureBuilder.scala:35)         在scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)         在scala.collection.LinearSeqOptimized.foldLeft $(LinearSeqOptimized.scala:122)         在scala.collection.immutable.List.foldLeft(List.scala:89)         在io.gatling.core.structure.StructureBuilder.build(StructureBuilder.scala:34)         在io.gatling.core.structure.StructureBuilder.build $(StructureBuilder.scala:33)         在io.gatling.core.structure.ScenarioBuilder.build(ScenarioBuilder.scala:38)         在io.gatling.core.structure.PopulationBuilder.build(ScenarioBuilder.scala:100)         at io.gatling.core.scenario.SimulationParams。$ anonfun $ scenarios $ 1(Simulation.scala:194)         在scala.collection.immutable.List.map(List.scala:286)         在io.gatling.core.scenario.SimulationParams.scenarios(Simulation.scala:194)         在io.gatling.app.Runner.run0(Runner.scala:92)         在io.gatling.app.Runner.run(Runner.scala:61)         在io.gatling.app.Gatling $ .start(Gatling.scala:74)         在io.gatling.app.Gatling $ .fromArgs(Gatling.scala:47)         在io.gatling.app.Gatling $ .main(Gatling.scala:39)         在io.gatling.app.Gatling.main(Gatling.scala)         在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处         在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         在java.lang.reflect.Method.invoke(Method.java:498)         在io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)         在io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)

是否可以解决此问题?谢谢!

1 个答案:

答案 0 :(得分:0)

也许您没有使用Java 8?此问题已在develop分支中进行了修复:https://github.com/intuit/karate/issues/647

否则,请按照以下过程操作:https://github.com/intuit/karate/issues/647