我開始使用Scala學習Akka。我有我的項目導入lib akka-actor_2.10-2.3.10和typesafe-config-2.10.1。 但是,它運行時會發生異常。 細節:運行Akka(Scala)中的異常
Exception in thread "main" java.lang.NoSuchMethodError: com.typesafe.config.Config.getDuration(Ljava/lang/String;Ljava/util/concurrent/TimeUnit;)J
at akka.util.Helpers$ConfigOps$.akka$util$Helpers$ConfigOps$$getDuration$extension(Helpers.scala:126)
at akka.util.Helpers$ConfigOps$.getMillisDuration$extension(Helpers.scala:121)
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:172)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:505)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:109)
at com.livepass.thiendp.scala.akka.Main$delayedInit$body.apply(HelloActor.scala:22)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at com.livepass.thiendp.scala.akka.Main$.main(HelloActor.scala:21)
at com.livepass.thiendp.scala.akka.Main.main(HelloActor.scala)
請幫幫我。
我沒有檢查是什麼錯誤,但我建議你使用Typesafe激活器來開始學習Akka。這非常簡單和容易。 http://www.typesafe.com/activator/template/hello-akka –