NoClassDefFoundError:org / grails / compiler / gorm / GormEntityTransformation [英] NoClassDefFoundError: org/grails/compiler/gorm/GormEntityTransformation
问题描述
目前我正在将一个相当大的应用程序升级到mongodb:5.0.1.RELEASE,它来自mongodb:3.0.2,并且在尝试 grails包$ c $时收到以下异常由于:org / grails / compiler / gorm / GormEntityTransformation在$ or
$ b
引发:java.lang.NoClassDefFoundError .codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjection(GormTransformer.java:69)
at org.codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjectionOnAnnatedatedClass(GormTransformer.java:78)
at org.codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjection(GormTransformer.java:61)
我按照以下说明使用新的mongodb插件:
http://grails.github.io/grails-data-mapping/latest/mongodb/manual/guide/gettingStarted.html
My Environment:
- 操作系统:Windows 7
- JVM:1.8.0_66
- Grails:2.5.3
- Groovy:2.4.4
我已经使用grails 2.5.3创建了一个 new / clean 项目,并将其升级到了新版本的mongodb插件,并且工作得很完美,所以我知道这个问题与我的配置有关,但是我'
我的构建配置:
dependencies {
runtime'org.springframework.data:spring-data-mongodb:1.8.1.RELEASE'
compilenet.sf.ehcache:ehcache-core:2.4。 8
testorg.gebish:geb-spock:$ gebVersion
testorg.seleniumhq.selenium:selenium-firefox-driver:$ seleniumVersion
testorg.seleniumhq.selenium:selenium-chrome-driver:$ seleniumVersion
testorg.seleniumhq.selenium:selenium-ie-driver:$ seleniumVersion
testorg.seleniumhq。硒:硒suppo rt:$ seleniumVersion
test(org.seleniumhq.selenium:selenium-htmlunit-driver:$ seleniumVersion){exclude'xml-apis'}
build'org.apache。 httpcomporents:httpcore:4.3.2'
build'org.apache.httpcomponents:httpclient:4.3.2'
runtime'org.apache.httpcomponents:httpcore:4.3.2'
runtime' org.apache.httpcomponents:httpclient:4.3.2'
compile'org.apache.poi:poi:3.11'
compile'org.apache.poi:poi-ooxml:3.11'
compile'org.apache.poi:poi-ooxml-schemas:3.11'
compile'org.apache.poi:ooxml-schemas:1.1'
compilecom。 sun.jersey:jersey-bundle:1.6
compile'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
runtime'xml-apis: xml-apis:1.4.01'
compile'org.apache.httpcomponents:httpmime:4.3.3'
test'org.powermock:powermock-api-mockito: 1.6.2'
编译'org.apache.commons:通用s-lang3:3.4'
}
plugins {
build:tomcat:7.0.55
compile:脚手架:2.1.2
compile:cache:1.1.8'
compile:asset-pipeline:1.9.9
compile:less-asset-pipeline:1.10.0
runtime:database-migration:1.4.0
runtime:jquery:1.11.1
runtime:aws-sdk:1.9.22'
compile(:mongodb:5.0.1.RELEASE);
$ b编译:spring-security-core:2.0-RC4
compile:fields:1.4
compile:mail:1.0.7
compile:phonenumbers:0.10
testorg.grails.plugins:geb:$ gebVersion
解决方案我找到了。我还需要升级GORM,而不仅仅是gong mongodb插件。
依赖关系{
...
编译org.grails:grails -datastore-gorm:5.0.1.RELEASE'
...
}
I'm currently upgrading a rather large application to mongodb:5.0.1.RELEASE from mongodb:3.0.2 and I'm receiving the following exception when attempting to
grails package
Caused by: java.lang.NoClassDefFoundError: org/grails/compiler/gorm/GormEntityTransformation at org.codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjection(GormTransformer.java:69) at org.codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjectionOnAnnotatedClass(GormTransformer.java:78) at org.codehaus.groovy.grails.compiler.gorm.GormTransformer.performInjection(GormTransformer.java:61)
I followed these instructions for using the new mongodb plugin: http://grails.github.io/grails-data-mapping/latest/mongodb/manual/guide/gettingStarted.html
My Environment:- OS: Windows 7
- JVM: 1.8.0_66
- Grails: 2.5.3
- Groovy: 2.4.4
I've created a new/clean project using grails 2.5.3 and upgraded it to the new version of the mongodb plugin and it worked perfectly, so I know the issue is somewhere with my configuration, but I'm running out of places to look.
My build configuration:
dependencies { runtime 'org.springframework.data:spring-data-mongodb:1.8.1.RELEASE' compile "net.sf.ehcache:ehcache-core:2.4.8" test "org.gebish:geb-spock:$gebVersion" test "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion" test "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion" test "org.seleniumhq.selenium:selenium-ie-driver:$seleniumVersion" test "org.seleniumhq.selenium:selenium-support:$seleniumVersion" test("org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion") { exclude 'xml-apis' } build 'org.apache.httpcomponents:httpcore:4.3.2' build 'org.apache.httpcomponents:httpclient:4.3.2' runtime 'org.apache.httpcomponents:httpcore:4.3.2' runtime 'org.apache.httpcomponents:httpclient:4.3.2' compile 'org.apache.poi:poi:3.11' compile 'org.apache.poi:poi-ooxml:3.11' compile 'org.apache.poi:poi-ooxml-schemas:3.11' compile 'org.apache.poi:ooxml-schemas:1.1' compile "com.sun.jersey:jersey-bundle:1.6" compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1' runtime 'xml-apis:xml-apis:1.4.01' compile 'org.apache.httpcomponents:httpmime:4.3.3' test 'org.powermock:powermock-api-mockito:1.6.2' compile 'org.apache.commons:commons-lang3:3.4' } plugins { build ":tomcat:7.0.55" compile ":scaffolding:2.1.2" compile ':cache:1.1.8' compile ":asset-pipeline:1.9.9" compile ":less-asset-pipeline:1.10.0" runtime ":database-migration:1.4.0" runtime ":jquery:1.11.1" runtime ':aws-sdk:1.9.22' compile(":mongodb:5.0.1.RELEASE"); compile ":spring-security-core:2.0-RC4" compile ":fields:1.4" compile ":mail:1.0.7" compile ":phonenumbers:0.10" test "org.grails.plugins:geb:$gebVersion" }
解决方案I found it. I needed to also upgrade GORM rather than just the gorm mongodb plugin. This got me past the issue.
dependencies { ... compile org.grails:grails-datastore-gorm:5.0.1.RELEASE' ... }
这篇关于NoClassDefFoundError:org / grails / compiler / gorm / GormEntityTransformation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!