I have a play app in scala 2.13 which used to work well in 2.12. Here's my module which extends AbstractModule with AkkaGuiceSupport:

class TimerModule(environment: Environment, configuration: Configuration) extends AbstractModule with AkkaGuiceSupport {
   // rest of the code
   def configure(): Unit = {
    val actorSystemProvider = this.getProvider(classOf[ActorSystem])
    bindActor[TimerActor]("actor-1")
    bindActor[InvocationLogActor]("actor-2")
    bind(classOf[ExecutionContext])
      .annotatedWith(Names.named("blocking-tasks"))
      .toProvider(classOf[BlockingTaskDispatcherProvider])

    bindActor[ClusterEventListener]("actor-3")
    bindActor[ClusterSingletonProxy]("actor-4", _ => Actor4.props(
      singletonManagerPath = "/user/caller-actor",
      settings = Actor4Settings(actorSystemProvider.get())))
   }

}

The code compiles well however upon runtime, I am getting an error that says:

Error in custom provider, java.lang.IllegalStateException: cannot create children while terminating or terminated at play.api.libs.concurrent.AkkaGuiceSupport.bindActor(AkkaGuiceSupport.scala:76)

I read about other threads like this or this or this but still not getting why its failing for me. Any leads is highly apprecicated

0

There are 0 best solutions below