{"action":"closed","issue":{"url":"https://api.github.com/repos/scaldi/scaldi-play/issues/24","labels_url":"https://api.github.com/repos/scaldi/scaldi-play/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/scaldi/scaldi-play/issues/24/comments","events_url":"https://api.github.com/repos/scaldi/scaldi-play/issues/24/events","html_url":"https://github.com/scaldi/scaldi-play/issues/24","id":106821498,"number":24,"title":"Injection Works Correct in Development Mode, but Fails in Production","user":{"login":"michaelahlers","id":2034877,"avatar_url":"https://avatars.githubusercontent.com/u/2034877?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelahlers","html_url":"https://github.com/michaelahlers","followers_url":"https://api.github.com/users/michaelahlers/followers","following_url":"https://api.github.com/users/michaelahlers/following{/other_user}","gists_url":"https://api.github.com/users/michaelahlers/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelahlers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelahlers/subscriptions","organizations_url":"https://api.github.com/users/michaelahlers/orgs","repos_url":"https://api.github.com/users/michaelahlers/repos","events_url":"https://api.github.com/users/michaelahlers/events{/privacy}","received_events_url":"https://api.github.com/users/michaelahlers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-16T17:31:55Z","updated_at":"2015-09-17T12:49:09Z","closed_at":"2015-09-17T12:49:09Z","body":"In the process of migrating a Play 2.3 application to 2.4. Not sure if this is a Scaldi bug or a configuration problem in my project, but the behavior's simple. When in development mode (`sbt run`), everything works fine, but when in production (`sbt start`), I get Guice injection errors like the following.\r\n\r\n```\r\n[ConfigurationException: Guice configuration errors:\r\n\r\n1) Could not find a suitable constructor in controllers.Application. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.\r\n  at controllers.Application.class(Application.scala:24)\r\n  while locating controllers.Application\r\n\r\n1 error]\r\n```\r\n\r\nFor reference, that controller's definition is:\r\n\r\n```scala\r\nclass Application(implicit inj: Injector)\r\n  extends Controller\r\n          with Injectable\r\n          with LazyLogging {\r\n  // ...\r\n}\r\n```\r\n\r\nA line referencing that controller from `/conf/routes` is:\r\n\r\n```\r\nGET  /index  @controllers.Application.index\r\n```\r\n\r\nAnd, finally, a snippet from `/conf/application.conf`:\r\n\r\n```\r\nplay.application.loader = scaldi.play.ScaldiApplicationLoader\r\nplay.modules.enabled += modules.ApplicationModule\r\nplay.modules.enabled += scaldi.play.ControllerInjector\r\n```\r\n\r\nUsing `scaldi-play` version 0.5.8.\r\n\r\nWhile I'm still trying to narrow this down or reproduce it in the Scadi sample Play application, I'm posting this bug early if there's a common mistake I'm making."}}