title: How to inject services into actors using the Play 2.4?
body: <p>I am able to inject services into my Application class with no issues. But somehow I am unable to inject into the actors themselves.</p>
  
  <p>My actor:</p>
  
  <pre><code>class PollerCrow @Inject()(
       @Named("pollService") pollService: PollService[List[ChannelSftp#LsEntry]]
       , @Named("redisStatusService") redisStatusService: StatusService
       , @Named("dynamoDBStatusService") dynamoDbStatusService: StatusService
  ) extends BaseCrow {
  ... impl and stuff ...
  }
  </code></pre>
  
  <p>My actor's companion object:</p>
  
  <pre><code>object PollerCrow extends NamedActor {
    override def name: String = this.getClass.getSimpleName
  
    val filesToProcess = ConfigFactory.load().getString("poller.crow.files.to.process")    
    def props = Props[PollerCrow]
  }
  </code></pre>
  
  <p>I'm getting the following when I run it:</p>
  
  <pre><code>IllegalArgumentException: no matching constructor found on class watcher.crows.PollerCrow for arguments []
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>Edit:</p>
  
  <p>I have binded my actors:</p>
  
  <pre><code>class ActorModule extends AbstractModule with AkkaGuiceSupport {
  
    override def configure() {
      bindPollerActors()
    }
  
    private def PollActors() = {
      bindActor[PollerCrow](PollerCrow.name)
    }
  }
  </code></pre>
  
  <p>Edit 2:</p>
  
  <p>Additional details to the class:</p>
  
  <pre><code>abstract class BaseCrow extends Crow with Actor with ActorLogging
  
  class PollerCrow @Inject()(
              @Named(ServiceNames.PollService) pollService: PollService[List[ChannelSftp#LsEntry]]
            , @Named(ServiceNames.RedisStatusService) redisStatusService: StatusService
            , @Named(ServiceNames.DynamoDbStatusService) dynamoDbStatusService: StatusService
  ) extends BaseCrow {
  
    override def receive: Receive = {
      ...
    }
  }
  
  object PollerCrow extends NamedActor {
    override def name: String = this.getClass.getSimpleName
  
    def props = Props[PollerCrow]
  }
  
  trait NamedActor {
    def name: String
    final def uniqueGeneratedName: String = name + Random.nextInt(10000)
  }
  </code></pre>