当我在本地运行grails app时出现以下错误
file:/home/schepuri/grails/2.4.4/projects/my-app/plugins/excel-import-0.9.6/lib/xmlbeans-2.3.0-without-w3c.jar
-------------------------------------------------------------
java.lang.IllegalStateException: No Datastore Session bound to thread, and configuration does not allow creation of non-transactional one here
at org.grails.datastore.mapping.core.DatastoreUtils.doGetSession(DatastoreUtils.java:149)
at org.grails.datastore.mapping.core.AbstractDatastore.getCurrentSession(AbstractDatastore.java:141)
at org.grails.datastore.gorm.GormStaticApi.createCriteria(GormStaticApi.groovy:297)
这是我的BuildConfig.groovy文件
dependencies {
compile 'org.grails:grails-datastore-gorm-plugin-support:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-gorm:3.1.3.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.3.RELEASE'
}
plugins {
compile (":mongodb:3.0.2") {
excludes 'grails-datastore-gorm-plugin-support'
excludes 'grails-datastore-gorm'
excludes 'grails-datastore-core'
}
}
我的buildconfig文件或
中缺少任何依赖插件