我从这里收到上述错误消息:
implicit val askTimeout = Timeout(60 seconds)
val workerFuture = workerContext actorSelection(payload.classname) resolveOne()
val worker = Await.result(workerFuture, 10 seconds)
worker ask Landau(List("1", "2", "3"))
具体来自第二行..导入是
import akka.actor._
import akka.util.Timeout
import akka.pattern.{ ask, pipe }
import scala.concurrent.duration._
import scala.concurrent.Await
import java.util.concurrent.TimeUnit
akka版本是2.2.1,scala是2.10.2,我使用sbt 0.13来构建它... 我无法真正理解什么是错的,因为resolveOne定义来自那个包..
编辑:我用
打印了班级的所有方法ActorSelection.getClass.getMethods.map(_.getName).foreach { p => println(p)}
这就是结果:
apply
toScala
wait
wait
wait
equals
toString
hashCode
getClass
notify
notifyAll
答案 0 :(得分:1)
我遇到了同样的问题,并改变了我的Scala和Akka版本,如下面的链接所述。 为简单起见,我带来了build.sbt的一部分:
scalaVersion := "2.10.4"
resolvers += "Akka Snapshot Repository" at "http://repo.akka.io/snapshots/"
libraryDependencies ++= Seq("com.typesafe.akka" %% "akka-actor" % "2.4-SNAPSHOT")
link:http://doc.akka.io/docs/akka/snapshot/intro/getting-started.html