2011-05-11 157 views
3

安裝導出插件我不能運行Grails應用程序,並得到這個Grails應用程序將無法運行

java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" 
at java.lang.Class.getDeclaredMethods0(Native Method) 
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) 
at java.lang.Class.getDeclaredMethods(Class.java:1791) 
at java.security.AccessController.doPrivileged(Native Method) 
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46) 
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33) 
at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy:123) 
at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy) 
at grails.util.PluginBuildSettings$getPluginInfos.callCurrent(Unknown Source) 
at grails.util.PluginBuildSettings.getPluginInfo(PluginBuildSettings.groovy:167) 
at grails.util.PluginBuildSettings$getPluginInfo.callCurrent(Unknown Source) 
at grails.util.PluginBuildSettings.getPluginInfoForSource(PluginBuildSettings.groovy:208) 
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:302) 
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:824) 
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:521) 
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:497) 
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474) 
at _GrailsEvents_groovy.run(_GrailsEvents_groovy:54) 
at _GrailsEvents_groovy$run.call(Unknown Source) 
at _GrailsClean_groovy$run.call(Unknown Source) 
at _GrailsClean_groovy.run(_GrailsClean_groovy:29) 
at _GrailsClean_groovy$run.call(Unknown Source) 
at _GrailsPlugins_groovy$run.call(Unknown Source) 
at _GrailsPlugins_groovy.run(_GrailsPlugins_groovy:32) 
at _GrailsPlugins_groovy$run.call(Unknown Source) 
at _GrailsRun_groovy$run.call(Unknown Source) 
at _GrailsRun_groovy.run(_GrailsRun_groovy:31) 
at _GrailsRun_groovy$run.call(Unknown Source) 
at RunApp.run(RunApp.groovy:25) 
at RunApp$run.call(Unknown Source) 
at gant.Gant.prepareTargets(Gant.groovy:606) 
Error loading event script from file [/home/natalia/.grails/1.3.7/projects/MEM1.1/plugins/tomcat-1.3.7/scripts/_Events.groovy] loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" 
Error executing script RunApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" 
java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" 
    at java.lang.Class.getDeclaredMethods0(Native Method) 
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) 
    at java.lang.Class.getDeclaredMethods(Class.java:1791) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46) 
    at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33) 
    at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy:123) 
    at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy) 
    at grails.util.PluginBuildSettings$getPluginInfos.callCurrent(Unknown Source) 
    at grails.util.PluginBuildSettings.getPluginInfoForName(PluginBuildSettings.groovy:180) 
    at grails.util.PluginBuildSettings$getPluginInfoForName.call(Unknown Source) 
    at _PluginDependencies_groovy$_run_closure1.doCall(_PluginDependencies_groovy:66) 
    at _PackagePlugins_groovy$_run_closure2.doCall(_PackagePlugins_groovy:69) 
    at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:81) 
    at RunApp$_run_closure1.doCall(RunApp.groovy:28) 
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
    at gant.Gant.withBuildListeners(Gant.groovy:427) 
    at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) 
    at gant.Gant.dispatch(Gant.groovy:415) 
    at gant.Gant.this$2$dispatch(Gant.groovy) 
    at gant.Gant.invokeMethod(Gant.groovy) 
    at gant.Gant.executeTargets(Gant.groovy:590) 
    at gant.Gelpant.executeTargets(Gant.groovy:589) 
Error executing script RunApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" 

什麼是錯後?請幫助...

回答

2

這似乎是一個類路徑地獄的結果...

兩個依賴鏈接相同的罐子不同版本

檢查你的依賴關係,當場認罪罐子(這似乎是一個SAX解析器),並在您的BuildConfig.groovy刪除此鏈接

乾杯

Grooveek

0

SaxP arseException由JVM加載,我猜這個插件正在加載一箇舊版本。 只需將排除參數添加到插件

運行grails「dependency-report」來找出哪個jar導致了問題。