“value ? is not a member of akka.actor.ActorRef”

I was trying to use a Future in Akka today and got the following error message:

value ? is not a member of akka.actor.ActorRef

It turns out you have to import the akka.pattern.ask to use ‘?’. There is a implicit conversion from ActorRef to AskableActorRef.

So add the following import and you should be set to go (take note that ask does not start with a capital:

import akka.pattern.ask
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s