I\'ve upgraded an app to Grails 2.4.0, and I\'m using the hibernate4 plugin. When executing run-app the error examples below are generated for each domain class using the in
Just set dbCreate="update"
, and the errors go away immediately.
The problem is that GORM (hibernate) is trying to drop tables in the H2 DB that have never been created because the DB is created new each time you run the app. Unfortunately, dbCreate is set to create-drop by default, which really doesn't make sense for a database that is created on the fly at runtime.
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}