{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/5159","labels_url":"https://api.github.com/repos/playframework/playframework/issues/5159/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/5159/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/5159/events","html_url":"https://github.com/playframework/playframework/issues/5159","id":110343169,"number":5159,"title":"Intellij IDE: A binding to play.api.db.DBApi was already configured, evolutions and injector error with play-slick","user":{"login":"ysihaoy","id":1303601,"avatar_url":"https://avatars.githubusercontent.com/u/1303601?v=3","gravatar_id":"","url":"https://api.github.com/users/ysihaoy","html_url":"https://github.com/ysihaoy","followers_url":"https://api.github.com/users/ysihaoy/followers","following_url":"https://api.github.com/users/ysihaoy/following{/other_user}","gists_url":"https://api.github.com/users/ysihaoy/gists{/gist_id}","starred_url":"https://api.github.com/users/ysihaoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ysihaoy/subscriptions","organizations_url":"https://api.github.com/users/ysihaoy/orgs","repos_url":"https://api.github.com/users/ysihaoy/repos","events_url":"https://api.github.com/users/ysihaoy/events{/privacy}","received_events_url":"https://api.github.com/users/ysihaoy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-07T23:53:13Z","updated_at":"2015-10-08T08:37:40Z","closed_at":"2015-10-08T07:41:51Z","body":"I want to introduce slick to my play project, so I add the following dependencies to build.sbt:\r\n```\r\n\"com.typesafe.play\"          %% \"play-slick\"               % \"1.0.1\"     withSources(),\r\n  \"com.typesafe.play\"          %% \"play-slick-evolutions\"    % \"1.0.1\"     withSources(),\r\n```\r\nThen, when I run an integration spec for controller I got following exception both on Intellij IDE and command line activator test. After Google I found the solution: https://www.playframework.com/documentation/2.4.x/PlaySlickFAQ#A-binding-to-play.api.db.DBApi-was-already-configured\r\n\r\nAfter I removed the jdbc dependency, the integration spec passed when I using the command line, however I still got the same error when I run the test on Intellij IDE as following error: Exception encountered when invoking run on a nested suite - Unable to create injector, see the following errors:\r\n\r\nException encountered when invoking run on a nested suite - Unable to create injector, see the following errors:\r\n```\r\n1) A binding to play.api.db.DBApi was already configured at play.api.db.DBModule.bindings(DBModule.scala:25):\r\nBinding(interface play.api.db.DBApi to ProviderConstructionTarget(class play.api.db.DBApiProvider)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1).\r\n  at play.api.db.slick.evolutions.EvolutionsModule.bindings(EvolutionsModule.scala:15):\r\nBinding(interface play.api.db.DBApi to ConstructionTarget(class play.api.db.slick.evolutions.internal.DBApiAdapter) in interface javax.inject.Singleton) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)\r\n\r\n1 error\r\ncom.google.inject.CreationException: Unable to create injector, see the following errors:\r\n\r\n1) A binding to play.api.db.DBApi was already configured at play.api.db.DBModule.bindings(DBModule.scala:25):\r\nBinding(interface play.api.db.DBApi to ProviderConstructionTarget(class play.api.db.DBApiProvider)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1).\r\n  at play.api.db.slick.evolutions.EvolutionsModule.bindings(EvolutionsModule.scala:15):\r\nBinding(interface play.api.db.DBApi to ConstructionTarget(class play.api.db.slick.evolutions.internal.DBApiAdapter) in interface javax.inject.Singleton) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)\r\n\r\n1 error\r\n\tat com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)\r\n\tat com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)\r\n\tat com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:96)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:73)\r\n\tat com.google.inject.Guice.createInjector(Guice.java:62)\r\n\tat play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)\r\n\tat play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)\r\n\tat play.api.test.FakeApplication.<init>(Fakes.scala:216)\r\n\tat org.scalatestplus.play.OneServerPerSuite$class.app(OneServerPerSuite.scala:152)\r\n```"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/146459029","html_url":"https://github.com/playframework/playframework/issues/5159#issuecomment-146459029","issue_url":"https://api.github.com/repos/playframework/playframework/issues/5159","id":146459029,"user":{"login":"dotta","id":703748,"avatar_url":"https://avatars.githubusercontent.com/u/703748?v=3","gravatar_id":"","url":"https://api.github.com/users/dotta","html_url":"https://github.com/dotta","followers_url":"https://api.github.com/users/dotta/followers","following_url":"https://api.github.com/users/dotta/following{/other_user}","gists_url":"https://api.github.com/users/dotta/gists{/gist_id}","starred_url":"https://api.github.com/users/dotta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotta/subscriptions","organizations_url":"https://api.github.com/users/dotta/orgs","repos_url":"https://api.github.com/users/dotta/repos","events_url":"https://api.github.com/users/dotta/events{/privacy}","received_events_url":"https://api.github.com/users/dotta/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T08:37:40Z","updated_at":"2015-10-08T08:37:40Z","body":"@ysihaoy If it works from the command line and it doesn't work from within IntelliJ, then I'd say it's very likely an IntelliJ bug."}}