{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/4779","labels_url":"https://api.github.com/repos/playframework/playframework/issues/4779/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/4779/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/4779/events","html_url":"https://github.com/playframework/playframework/issues/4779","id":91382226,"number":4779,"title":"Can't use Java controller with Scala app in Play 2.4?","user":{"login":"brikis98","id":711908,"avatar_url":"https://avatars.githubusercontent.com/u/711908?v=3","gravatar_id":"","url":"https://api.github.com/users/brikis98","html_url":"https://github.com/brikis98","followers_url":"https://api.github.com/users/brikis98/followers","following_url":"https://api.github.com/users/brikis98/following{/other_user}","gists_url":"https://api.github.com/users/brikis98/gists{/gist_id}","starred_url":"https://api.github.com/users/brikis98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brikis98/subscriptions","organizations_url":"https://api.github.com/users/brikis98/orgs","repos_url":"https://api.github.com/users/brikis98/repos","events_url":"https://api.github.com/users/brikis98/events{/privacy}","received_events_url":"https://api.github.com/users/brikis98/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-26T23:06:56Z","updated_at":"2015-06-26T23:25:49Z","closed_at":"2015-06-26T23:22:10Z","body":"I'm trying to upgrade the [ping-play](https://github.com/brikis98/ping-play) app to Play 2.4 and to use [Scala Compile Time Dependency Injection](https://playframework.com/documentation/2.4.x/ScalaCompileTimeDependencyInjection). My `ApplicationLoader` looks something like this:\r\n\r\n```scala\r\nclass PingApplicationLoader extends ApplicationLoader {\r\n  override def load(context: Context): Application = {\r\n    new PingComponents(context).application\r\n  }\r\n}\r\n\r\nclass PingComponents(context: Context) extends BuiltInComponentsFromContext(context)  {\r\n  lazy val scalaController = new ScalaController()\r\n  lazy val javaController = new JavaController()\r\n\r\n  lazy val router: Router = new Routes(httpErrorHandler, scalaController, javaController)\r\n}\r\n```\r\n\r\nWhen I go to the URL for the `scalaController`, it works fine. When I go to the URL for the `javaController`, I get the following error:\r\n\r\n```\r\n[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty\r\nscala.MatchError: Right((play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$14$$anon$3@43355ebf,play.api.DefaultApplication@2ac109ad)) (of class scala.util.Right)\r\n\tat play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:150) ~[play-netty-server_2.11-2.4.0.jar:2.4.0]\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.10.3.Final.jar:na]\r\n\tat com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) [netty-http-pipelining-1.1.4.jar:na]\r\n\tat org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:108) [netty-3.10.3.Final.jar:na]\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty-3.10.3.Final.jar:na]\r\n```\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/115916661","html_url":"https://github.com/playframework/playframework/issues/4779#issuecomment-115916661","issue_url":"https://api.github.com/repos/playframework/playframework/issues/4779","id":115916661,"user":{"login":"brikis98","id":711908,"avatar_url":"https://avatars.githubusercontent.com/u/711908?v=3","gravatar_id":"","url":"https://api.github.com/users/brikis98","html_url":"https://github.com/brikis98","followers_url":"https://api.github.com/users/brikis98/followers","following_url":"https://api.github.com/users/brikis98/following{/other_user}","gists_url":"https://api.github.com/users/brikis98/gists{/gist_id}","starred_url":"https://api.github.com/users/brikis98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brikis98/subscriptions","organizations_url":"https://api.github.com/users/brikis98/orgs","repos_url":"https://api.github.com/users/brikis98/repos","events_url":"https://api.github.com/users/brikis98/events{/privacy}","received_events_url":"https://api.github.com/users/brikis98/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T23:25:49Z","updated_at":"2015-06-26T23:25:49Z","body":"Posted here: https://groups.google.com/forum/#!topic/play-framework/A0rCbXVX_Gw"}}