{"action":"created","issue":{"url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/75","repository_url":"https://api.github.com/repos/grails-plugins/grails-database-migration","labels_url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/75/comments","events_url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/75/events","html_url":"https://github.com/grails-plugins/grails-database-migration/issues/75","id":158361618,"number":75,"title":"Grailschanges not working with GORM and Java 8","user":{"login":"bwollmer","id":12231522,"avatar_url":"https://avatars.githubusercontent.com/u/12231522?v=3","gravatar_id":"","url":"https://api.github.com/users/bwollmer","html_url":"https://github.com/bwollmer","followers_url":"https://api.github.com/users/bwollmer/followers","following_url":"https://api.github.com/users/bwollmer/following{/other_user}","gists_url":"https://api.github.com/users/bwollmer/gists{/gist_id}","starred_url":"https://api.github.com/users/bwollmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwollmer/subscriptions","organizations_url":"https://api.github.com/users/bwollmer/orgs","repos_url":"https://api.github.com/users/bwollmer/repos","events_url":"https://api.github.com/users/bwollmer/events{/privacy}","received_events_url":"https://api.github.com/users/bwollmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-03T12:59:01Z","updated_at":"2016-06-05T19:30:33Z","closed_at":null,"body":"We just updated our application from grails 2.5 to 3.1. We also use and upgraded the Grails Database Migration Plugin to version 2.0.0.RC4. We got everything working so far. But now we wanted to use Java 8 instead of Java 7 and this leads to an unexpected behavior within grailschanges, we can't run them anymore if they access domain objects. The following error appears: _​Either class [<ClassPath>] is not a domain class or GORM has not been initialized correctly or has already been shutdown_. If we use Java 7 again everything runs fine. We just switched the java version, we didn't change the code.\r\n\r\nAs an example:\r\n`changeSet(author: \"bwo\", id: \"1453106072000-2\") {\r\n        grailsChange {\r\n            change {\r\n                Book.withNewSession{\r\n                    new Book(title: \"test\").save()\r\n                }\r\n            }\r\n        }\r\n    }`\r\nThis change set runs with grails 3.1.8, Data Base Migration version 2.0.0.RC4 and Java 7 but not with Java 8\r\nIn Issue https://github.com/grails-plugins/grails-database-migration/issues/38 someone stated that GORM seems not to be supported anymore, but I could'nt find a statement from the developers. So is this true and we have to rewrite our changes to use plain sql or is this just a failure within the plugin?"},"comment":{"url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/comments/223832372","html_url":"https://github.com/grails-plugins/grails-database-migration/issues/75#issuecomment-223832372","issue_url":"https://api.github.com/repos/grails-plugins/grails-database-migration/issues/75","id":223832372,"user":{"login":"rkimaoui","id":6640339,"avatar_url":"https://avatars.githubusercontent.com/u/6640339?v=3","gravatar_id":"","url":"https://api.github.com/users/rkimaoui","html_url":"https://github.com/rkimaoui","followers_url":"https://api.github.com/users/rkimaoui/followers","following_url":"https://api.github.com/users/rkimaoui/following{/other_user}","gists_url":"https://api.github.com/users/rkimaoui/gists{/gist_id}","starred_url":"https://api.github.com/users/rkimaoui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkimaoui/subscriptions","organizations_url":"https://api.github.com/users/rkimaoui/orgs","repos_url":"https://api.github.com/users/rkimaoui/repos","events_url":"https://api.github.com/users/rkimaoui/events{/privacy}","received_events_url":"https://api.github.com/users/rkimaoui/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T19:30:33Z","updated_at":"2016-06-05T19:30:33Z","body":"+1"}}
{"actor":{"display_login":"rkimaoui"}}