1
votes

I've just updated Play! framework to version 2.1 and scala to version 2.10...

Now my Play! app is broken. It seems that the Akka API has changed. I can't find the Akka's version used now but I think it's the last version...

I just read the migration guide : http://doc.akka.io/docs/akka/2.1.0/project/migration-guide-2.0.x-2.1.x.html.

I've updated my code accordingly:

Akka.system().scheduler().scheduleOnce(
    new FiniteDuration(10, TimeUnit.SECONDS), 
    new MyRunnableJob(), 
    Akka.system().dispatcher()); 

But an error occurs as follows :

error: no suitable method found for scheduleOnce(akka.util.FiniteDuration,Runnable,ExecutionContext)

Yet we find it on the API documentation :

http://doc.akka.io/api/akka/2.1.1/index.html#akka.actor.Scheduler

1

1 Answers

1
votes

the Akka version should be 2.1.x, and you should try to send in a scala.concurrent.duration.FiniteDuration.

It seems like you have some old akka jars on the path, since the akka.util.FiniteDuration doesn't exist anymore.