im正在尝试使用elasticmq-rest-sqs运行sqs服务器:
"org.elasticmq" %% "elasticmq-rest-sqs" % "0.14.7"
和我的akka依赖项是:
val akka = Seq(
"com.lightbend.akka" %% "akka-stream-alpakka-sns" % "0.15",
"com.typesafe.akka" %% "akka-testkit" % "2.5.8" % Test withSources(),
"com.typesafe.akka" %% "akka-stream-testkit" % "2.5.8" % Test withSources(),
"com.lightbend.akka" %% "akka-stream-alpakka-sqs" % "0.15"
)
现在正在测试中,我正在写作:
// sqs server
val sqsServer: SQSRestServer = SQSRestServerBuilder.withPort(4576).withInterface("localhost").start()
sqsServer.waitUntilStarted()
我收到以下错误:
找不到所需的类。这可能是由于您的错误运行路径。缺少课程:akka / http / impl / util / SettingsCompanionjava.lang.NoClassDefFoundError:akka / http / impl / util / SettingsCompanion
它的版本确定,因为我在另一个项目中以相同的方式使用了它,但是在play 2.6中使用(不确定它是否与此有关)
如果正在降级elasticmq版本,则会出现此错误:
异常或错误导致运行中止:java.lang.NoClassDefFoundError:akka / http / scaladsl / settings / RoutingSettingsjava.lang.BootstrapMethodError:java.lang.NoClassDefFoundError:akka / http / scaladsl / settings / RoutingSettings
请帮助:/
对我来说,以下版本正在运行:(也解决了此问题,但已使用版本修复了该问题)
"org.elasticmq" %% "elasticmq-rest-sqs" % "0.15.2"
"com.typesafe.akka" %% "akka-testkit" % "2.5.8" % Test withSources(),
"com.typesafe.akka" %% "akka-stream-testkit" % "2.5.8" % Test withSources(),
"com.lightbend.akka" %% "akka-stream-alpakka-sqs" % alpakkaVersion
val alpakkaVersion =“ 1.0-M2”]
和:
"com.typesafe.play" % "sbt-plugin" % "2.7.2"