{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/4808","labels_url":"https://api.github.com/repos/playframework/playframework/issues/4808/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/4808/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/4808/events","html_url":"https://github.com/playframework/playframework/issues/4808","id":93091525,"number":4808,"title":"[Play 2.4.2 Java] Option for applying evolution script in dev-mode not offered when using Guice & Ebean","user":{"login":"cdraeger","id":4757845,"avatar_url":"https://avatars.githubusercontent.com/u/4757845?v=3","gravatar_id":"","url":"https://api.github.com/users/cdraeger","html_url":"https://github.com/cdraeger","followers_url":"https://api.github.com/users/cdraeger/followers","following_url":"https://api.github.com/users/cdraeger/following{/other_user}","gists_url":"https://api.github.com/users/cdraeger/gists{/gist_id}","starred_url":"https://api.github.com/users/cdraeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdraeger/subscriptions","organizations_url":"https://api.github.com/users/cdraeger/orgs","repos_url":"https://api.github.com/users/cdraeger/repos","events_url":"https://api.github.com/users/cdraeger/events{/privacy}","received_events_url":"https://api.github.com/users/cdraeger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-05T08:42:49Z","updated_at":"2015-12-26T18:27:28Z","closed_at":null,"body":"I'm in the process of migrating from Play 2.3 to 2.4. I am using Ebean ORM, had Guice DI set up in my `Global`, and was also inserting some rows into a table programmatically in `GlobalSettings.onStart`.\r\n\r\nAs stated in the [documentation](https://playframework.com/documentation/2.4.x/GlobalSettings), I got rid of the `Global` (specified my Guice modules in application.conf), and also moved the database interaction from `onStart()` to the constructor of an injected service as suggested.\r\n\r\nWhen running the application in dev-mode I now get 2 errors, the first being an unexpected `SQLException` that the table I am inserting into (in the constructor of my injected service) does not exist. The second error is that my database needs evolution.\r\n\r\nFrom my understanding, I should be offered to apply the evolution script before any database interaction occurs. This was working fine when I had the database-interaction in the `GlobalSettings.onStart` method. The only way to get my app running now is to use `play.evolutions.db.default.autoApply=true` in my application.conf. Then, everything seems to work just fine.\r\n\r\nThe errors:\r\n```\r\nCreationException: Unable to create injector, see the following errors:\r\n\r\n1) Error injecting constructor, javax.persistence.PersistenceException: Query threw SQLException:Table \"ROLE\" not found\r\n\r\n2) Error in custom provider, @6mkkdagnm: Database 'default' needs evolution!\r\n  while locating play.api.db.evolutions.ApplicationEvolutionsProvider\r\n  at play.api.db.evolutions.EvolutionsModule.bindings(EvolutionsModule.scala:22)\r\n```"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/167352870","html_url":"https://github.com/playframework/playframework/issues/4808#issuecomment-167352870","issue_url":"https://api.github.com/repos/playframework/playframework/issues/4808","id":167352870,"user":{"login":"neowinx","id":2184249,"avatar_url":"https://avatars.githubusercontent.com/u/2184249?v=3","gravatar_id":"","url":"https://api.github.com/users/neowinx","html_url":"https://github.com/neowinx","followers_url":"https://api.github.com/users/neowinx/followers","following_url":"https://api.github.com/users/neowinx/following{/other_user}","gists_url":"https://api.github.com/users/neowinx/gists{/gist_id}","starred_url":"https://api.github.com/users/neowinx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neowinx/subscriptions","organizations_url":"https://api.github.com/users/neowinx/orgs","repos_url":"https://api.github.com/users/neowinx/repos","events_url":"https://api.github.com/users/neowinx/events{/privacy}","received_events_url":"https://api.github.com/users/neowinx/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T18:27:28Z","updated_at":"2015-12-26T18:27:28Z","body":"Happy holidays everyone! :santa:\r\n\r\nBumping this since I would like it to be fixed too. Not an real issue though, but as @cdraeger says in dev mode it's a plus that everyone gets a big red message when evolutions have been added to the codebase.\r\n\r\nRegards"}}