title: Why am I getting this IllegalArgumentException exception when trying to inject services into an actor?
body: <p>My code:</p>
  
  <p>Global.scala - i just set it up so on startup, it sends the actor a quick  message. the exception is thrown from here; i verified that the injected services has been loaded.</p>
  
  <pre><code>object Global extends GlobalSettings {
    override def onStart(app: Application): Unit = {
      val system = app.actorSystem
      system.actorOf(TempActor.props, TempActor.name) ! "hi hi"
    }
  }
  </code></pre>
  
  <p>TempActor.scala</p>
  
  <pre><code>package actors
  
  class TempActor @Inject() (
      @Named(TestServiceModuleNames.RedisService) redisService: StatusService
    , @Named(TestServiceModuleNames.DynamoDbService) dynamoDbService: StatusService
  ) extends Actor with ActorLogging {
  
    override def receive: Receive = {
      case msg: Any =&gt;
        log.info(s"the msg =&gt; $msg")
        context.system.shutdown()
    }
  }
  
  object TempActor extends NamedActor {
    override def name: String = this.getClass.getSimpleName
    override def props: Props = Props[TempActor]
  }
  </code></pre>
  
  <p>TestServiceModule.scala - a guice module to load in the services that the actor needs, ive made sure to enable the module in the application.conf</p>
  
  <pre><code>package modules
  
  class TestServiceModule extends AbstractModule with AkkaGuiceSupport {
  
    val configs = ConfigFactory.load()
  
    override def configure(): Unit = {
  
      bind(classOf[StatusService]).annotatedWith(Names.named(TestServiceModuleNames.RedisService)).toInstance(new RedisStatusServiceImpl(new RedisConfig(configs.getString("redis.host"), configs.getInt("redis.port"))))
      bind(classOf[StatusService]).annotatedWith(Names.named(TestServiceModuleNames.DynamoDbService)).toInstance(new DynamoDBStatusServiceImpl(Region.US_EAST_1, configs.getString("dynamo.db.endpoint"), configs.getString("dynamo.db.table.name.status")))
    }
  }
  
  object TestServiceModuleNames {
    final val RedisService = "RedisStatusService"
    final val DynamoDbService = "DynamoDbStatusService"
  }
  </code></pre>
  
  <p>application.conf</p>
  
  <pre><code>redis.host="localhost"
  redis.port=4242
  
  dynamo.db.endpoint="http://localhost:8000"
  dynamo.db.table.name.status="status"
  
  play.modules {
    enabled += "modules.TestServiceModule"
  }
  
  play.akka.actor-system="warden"
  
  akka {
    loggers = ["akka.event.slf4j.Slf4jLogger"]
    loglevel = "DEBUG"
  }
  </code></pre>
  
  <p>My objective is to have a play app with the backend processing handled by actors. Each actor will have certain dependencies on different services, I tried to inject those services using google Guice. </p>
  
  <p>All I get when I start the app is the exception trace:</p>
  
  <pre><code>java.lang.IllegalArgumentException: no matching constructor found on class actors.TempActor for arguments []
  </code></pre>
  
  <p>I'm not sure how to fix this exactly...</p>
  
  <p>I am using Play 2.4. </p>