Hi, I'm trying to use akka 2.4.12 with play 2.5.4. I'm injecting 
ActorSystem using "*GuiceApplicationBuilder().injector()*" with "system = 
injector.instanceOf[ActorSystem]" or "*@Inject()(**implicit val system: 
ActorSystem**)*" to get an instance of ActorSystem. I'm using these two 
mechanisms (the first one in the scala Objects and the second one in 
Controllers) to substitute the deprecated default akka actor system 
(*Akka.system). 
*I can't understand why I get this error:

[info] a.e.s.Slf4jLogger - Slf4jLogger started
[debug] p.a.l.c.ActorSystemProvider - Starting application default Akka 
system: application
[debug] a.e.EventStream - logger log1-Slf4jLogger started
[debug] a.e.EventStream - Default Loggers started
[info] play.api.Play - Application started (Dev)
[info] application - Resolving database...
[DEBUG] [11/09/2016 12:30:22.182] [netty-event-loop-4] 
[EventStream(akka://reactivemongo)] logger log1-Logging$DefaultLogger 
started
[DEBUG] [11/09/2016 12:30:22.182] [netty-event-loop-4] 
[EventStream(akka://reactivemongo)] Default Loggers started
[info] application - ReactiveMongoApi successfully configured with DB 
'test'! Servers:
[localhost:27017]
[info] application - Resolving database...
[info] application - Resolving database...
[error] a.d.Dispatcher - problem in scala.concurrent internal callback
java.lang.IllegalStateException: problem in scala.concurrent internal 
callback
at 
scala.concurrent.Future$InternalCallbackExecutor$.reportFailure(Future.scala:601)
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40)
at 
scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248)
at scala.concurrent.Promise$class.complete(Promise.scala:55)
at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153)
Caused by: java.lang.IllegalArgumentException: requirement failed
at scala.Predef$.require(Predef.scala:207)
at scala.concurrent.BatchingExecutor$Batch.run(BatchingExecutor.scala:51)
at 
scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:599)
at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:72)
at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:78)

Maybe there is some errors in this code to initialize the main actors:


object ActorUtils{

 val injector = new GuiceApplicationBuilder().injector()
 val configuration = injector.instanceOf[Configuration]
 val messagesApi = injector.instanceOf[MessagesApi]
 val messages = messagesApi.preferred(Seq(Lang.defaultLang))

// val injectorGuice = Guice.createInjector(
// new ConfigModule(),
// new AkkaModule()
// )
// import net.codingwell.scalaguice.InjectorExtensions._
 implicit val system = injector.instanceOf[ActorSystem]

 val adminAddress = configuration.getString("emailer.adminAddress").get

 // ----- Top-level actors with just one incarnation -----
 val userDao = injector.instanceOf[UserDAO]

 val supervisor =
 system.actorOf(SupervisorActor.props(), "supervisor-actor")

 val taskDispatcher =
 system.actorOf(TaskDispatcher.props(supervisor), "task-dispatcher")

 val responseHandler =
 system.actorOf(ResponseHandler.props(supervisor, taskDispatcher), 
"response-handler")

 val taskStateActor =
 system.actorOf(TaskStateActor.props(supervisor, responseHandler, 
taskDispatcher), "task-state-actor")
}

I attached the application log. Thank you.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
2016-11-09 12:30:15,936 [INFO] from play.core.server.NettyServer in 
pool-4-thread-4 - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
2016-11-09 12:30:15,939 [INFO] from play.core.server.NettyServer in 
pool-4-thread-4 - Listening for HTTPS on /0:0:0:0:0:0:0:0:9443
2016-11-09 12:30:22,123 + [INFO] - from akka.event.slf4j.Slf4jLogger in 
application-akka.actor.default-dispatcher-2 
Slf4jLogger started

2016-11-09 12:30:22,126 + [DEBUG] - from 
play.api.libs.concurrent.ActorSystemProvider in ForkJoinPool-1-worker-1 
Starting application default Akka system: application

2016-11-09 12:30:22,126 + [DEBUG] - from akka.event.EventStream in 
application-akka.actor.default-dispatcher-2 
logger log1-Slf4jLogger started

2016-11-09 12:30:22,129 + [DEBUG] - from akka.event.EventStream in 
application-akka.actor.default-dispatcher-2 
Default Loggers started

2016-11-09 12:30:22,133 + [INFO] - from play.api.Play in 
ForkJoinPool-1-worker-1 
Application started (Dev)

2016-11-09 12:30:22,165 + [INFO] - from application in netty-event-loop-4 
Resolving database...

2016-11-09 12:30:22,215 + [INFO] - from application in netty-event-loop-4 
ReactiveMongoApi successfully configured with DB 'test'! Servers:
                [localhost:27017]

2016-11-09 12:30:22,270 + [INFO] - from application in netty-event-loop-4 
Resolving database...

2016-11-09 12:30:22,271 + [INFO] - from application in netty-event-loop-4 
Resolving database...

2016-11-09 12:30:22,487 + [ERROR] - from akka.dispatch.Dispatcher in 
application-akka.actor.default-dispatcher-6 
problem in scala.concurrent internal callback
java.lang.IllegalStateException: problem in scala.concurrent internal callback
        at 
scala.concurrent.Future$InternalCallbackExecutor$.reportFailure(Future.scala:601)
        at 
scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40)
        at 
scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248)
        at scala.concurrent.Promise$class.complete(Promise.scala:55)
        at 
scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at 
akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
        at 
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91)
        at 
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
        at 
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
        at 
scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
        at 
akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
        at 
akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:405)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at 
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at 
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at 
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.IllegalArgumentException: requirement failed
        at scala.Predef$.require(Predef.scala:207)
        at 
scala.concurrent.BatchingExecutor$Batch.run(BatchingExecutor.scala:51)
        at 
scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:599)
        at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:72)
        at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:78)
        at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:55)
        at 
scala.concurrent.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:55)
        at 
scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
        at 
scala.concurrent.BatchingExecutor$Batch.run(BatchingExecutor.scala:54)
        at 
scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:599)
        at 
scala.concurrent.BatchingExecutor$class.execute(BatchingExecutor.scala:106)
        at 
scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:597)
        ... 19 common frames omitted

Reply via email to