本文介绍了Grails XOM linkageerror - SAXParserException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能与我试图在我的grails项目中包含XOM。我如何知道我需要排除哪个依赖库?
依赖关系{
build('xom:xom:1.1'){
不包括xml-apis
}
}
错误:
java.lang.LinkageError:loader constraint violation:loader(< bootloader>的实例)加载
a不同类型的名称为org / xml / sax / SAXParseException$ b $在java.lang.Class.getDeclaredMethods0(本地方法)
在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:33)
在org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20)
在grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings。 groovy:124)
在grails.util.P luginBuildSettings.getPluginInfos(PluginBuildSettings.groovy)
at grails.util.PluginBuildSettings $ getPluginInfos.callCurrent(Unknown Source)
at grails.util.PluginBuildSettings.getPluginInfo(PluginBuildSettings.groovy:160)
at grails.util.PluginBuildSettings $ getPluginInfo.callCurrent(Unknown Source)
at grails.util.PluginBuildSettings.getPluginInfoForSource(PluginBuildSettings.groovy:195)
at org.codehaus.groovy.transform.ASTTransformationVisitor $ 3.call( ASTTransformationVisitor.java:303)
在org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:820)
在org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java: 513)
在org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:489)
在org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466)$ b $ _ at _GrailsEvents_groovy .run(_GrailsEvents_groovy:54)
at _GrailsEvents_groovy $ run.call(Unknown Source)
at _GrailsArgParsing_groovy $ run.call(未知来源)
at _GrailsArgParsing_groovy.run(_GrailsArgParsing_groovy:29)$ b $ _ at _GrailsArgParsing_groovy $ run.call(Unknown Source)
at _GrailsInit_groovy $ run.call(Unknown Source)
at _GrailsInit_groovy.run(_GrailsInit_groovy:38)
at _GrailsInit_groovy $ run.call未知源)
在Help_.run(Help_.groovy:27)
在Help_ $ run.call(未知源)
在gant.Gant.processTargets(Gant.groovy:494)
at gant.Gant.processTargets(Gant.groovy:480)
解决方案 div>
这个问题没有答案。只是不要在Grails中使用XOM; XmlSlurper和GPath具有可比性。
Possibly related: Grails - attempting to include HTPPBuilder - Linkage error
I'm trying to include XOM in my grails project. How do I know which dependency library I need to exclude? I'm lost here.
dependencies {
build('xom:xom:1.1') {
excludes "xml-apis"
}
}
Error:
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:33)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20)
at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy:124)
at grails.util.PluginBuildSettings.getPluginInfos(PluginBuildSettings.groovy)
at grails.util.PluginBuildSettings$getPluginInfos.callCurrent(Unknown Source)
at grails.util.PluginBuildSettings.getPluginInfo(PluginBuildSettings.groovy:160)
at grails.util.PluginBuildSettings$getPluginInfo.callCurrent(Unknown Source)
at grails.util.PluginBuildSettings.getPluginInfoForSource(PluginBuildSettings.groovy:195)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:303)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:820)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:513)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:489)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466)
at _GrailsEvents_groovy.run(_GrailsEvents_groovy:54)
at _GrailsEvents_groovy$run.call(Unknown Source)
at _GrailsArgParsing_groovy$run.call(Unknown Source)
at _GrailsArgParsing_groovy.run(_GrailsArgParsing_groovy:29)
at _GrailsArgParsing_groovy$run.call(Unknown Source)
at _GrailsInit_groovy$run.call(Unknown Source)
at _GrailsInit_groovy.run(_GrailsInit_groovy:38)
at _GrailsInit_groovy$run.call(Unknown Source)
at Help_.run(Help_.groovy:27)
at Help_$run.call(Unknown Source)
at gant.Gant.processTargets(Gant.groovy:494)
at gant.Gant.processTargets(Gant.groovy:480)
解决方案
There is no answer to this question. Just don't use XOM with Grails; XmlSlurper and GPath are comparable.
这篇关于Grails XOM linkageerror - SAXParserException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
08-12 20:09