title: Akka.io, No matching constructor found on class actors
body: <p>I'm tring to set-up Akka actors to deal with web-socket in play.</p>
  
  <p>I've defined a simple actor to send out messages trough web socket: </p>
  
  <pre><code>package actors;
  import akka.actor.*;
  
  public class MyWebSocketActor extends UntypedActor {
  
      public static Props props(ActorRef out) {
          return Props.create(MyWebSocketActor.class, out);
      }
  
      private final ActorRef out;
  
      public MyWebSocketActor(ActorRef out ) {
          this.out = out;
      }
  
      public void onReceive(Object message) throws Exception {
          if (message instanceof String) {
              out.tell(message, self());
          }
      }
  }
  </code></pre>
  
  <p>In the Application controller I've got the web-socket:</p>
  
  <pre><code>package controllers;
  import play.*;
  import play.mvc.*;
  import akka.util.*;
  import views.html.*;
  import actors.MyWebSocketActor;
  import play.libs.F.*;
  
  public class Application extends Controller {
  
      public static Result index() {
          return ok(index.render("Your new application is ready."));
      }
  
       public static WebSocket&lt;String&gt; socket() {
          return WebSocket.withActor(MyWebSocketActor::props);
       }
  
  }
  </code></pre>
  
  <p>Until now everything works as I expected. Now, in a controller I'm trying to pass a message to that actor. I've try with:</p>
  
  <pre><code>public class Messages extends Controller {
  
      private static final Form&lt;Message&gt; messageForm = Form.form(Message.class);
      @BodyParser.Of(BodyParser.Json.class)
  
      public static Result list(Integer page) {
          // --- Render
          ActorRef myActor = Akka.system().actorOf(Props.create(MyWebSocketActor.class));
          String message = "test";
          myActor.tell(message, ActorRef.noSender());
          //  
      }
  </code></pre>
  
  <p>But Here comes the error: "Cannot invoke the action, eventually got an error: java.lang.IllegalArgumentException: no matching constructor found on class actors.MyWebSocketActor for arguments[].</p>
  
  <pre><code>2014-08-05 05:50:23,503 - [INFO] - from play in pool-4-thread-4 
  Listening for HTTP on /0:0:0:0:0:0:0:0:9000
  
  2014-08-05 05:51:02,887 - [ERROR] - from application in New I/O worker #1 
  
  
  ! @6j5b25956 - Internal server error, for (GET) [/] -&gt;
  
  play.PlayExceptions$CompilationException: Compilation error[error: method tell in class ActorRef cannot be applied to given types;]
      at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
      at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
      at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
      at play.PlayReloader$$anon$1$$anonfun$play$PlayReloader$$anon$$taskFailureHandler$1.apply(PlayReloader.scala:297) ~[na:na]
      at play.PlayReloader$$anon$1$$anonfun$play$PlayReloader$$anon$$taskFailureHandler$1.apply(PlayReloader.scala:292) ~[na:na]
      at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
      at play.PlayReloader$$anon$1.play$PlayReloader$$anon$$taskFailureHandler(PlayReloader.scala:292) ~[na:na]
      at play.PlayReloader$$anon$1$$anonfun$reload$2.apply(PlayReloader.scala:325) ~[na:na]
      at play.PlayReloader$$anon$1$$anonfun$reload$2.apply(PlayReloader.scala:325) ~[na:na]
      at scala.util.Either$LeftProjection.map(Either.scala:377) ~[scala-library-2.11.1.jar:na]
      at play.PlayReloader$$anon$1.reload(PlayReloader.scala:325) ~[na:na]
      at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:107) ~[play_2.11-2.3.1.jar:2.3.1]
      at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:105) ~[play_2.11-2.3.1.jar:2.3.1]
      at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[scala-library-2.11.1.jar:na]
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[scala-library-2.11.1.jar:na]
  
  2014-08-05 05:51:03,084 - [WARN] - from play in New I/O worker #1 
  No application found at invoker init
  
  2014-08-05 06:08:03,586 - [ERROR] - from application in New I/O worker #2 
  </code></pre>