[scalac] found : akka.actor.Status.Success
That means the compiler sees your Success
and thinks it's an akka.actor.Status.Success
, when really you mean a scala.util.Success
. You probably have an import somewhere that is importing the akka Success class.
Either remove the import for akka.actor.Status.Success
, or resolve the ambiguity by either fully-qualifying the class, or using an import alias, e.g.
import scala.util.{Success => ScalaSuccess}
future.onComplete {
case ScalaSuccess(result) => ...
// or
case scala.util.Success(result) => ...
}