I have tried to use http://groovy.codehaus.org/GroovyWS
In my BuildConfig.groovy I have added: compile 'org.codehaus.groovy.modules:groovyws:0.5.2'
I then go to Refresh Dependencies and after downloading bunch of stuff, I end up with:
Error executing script Compile: loader constraint violation in interface itable initialization: when resolving method "org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.apache.ivy.util.XMLHelper.parseToDom(XMLHelper.java:196)
at org.apache.ivy.plugins.parser.m2.PomReader.<init>(PomReader.java:95)
at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:118)
at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescri开发者_高级运维ptor(PomModuleDescriptorParser.java:108)
at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:659)
at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:676)
at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:993)
at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)
at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)
at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:287)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:696)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:769)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:769)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:576)
at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:237)
at org.apache.ivy.core.resolve.ResolveEngine$resolve.call(Unknown Source)
at grails.util.BuildSettings$_getDefaultCompileDependencies_closure9.doCall(BuildSettings.groovy:293)
at grails.util.BuildSettings$_getDefaultCompileDependencies_closure9.doCall(BuildSettings.groovy)
at grails.util.BuildSettings.getDefaultCompileDependencies(BuildSettings.groovy:293)
at grails.util.BuildSettings.getCompileDependencies(BuildSettings.groovy:278)
at _GrailsClasspath_groovy$_run_closure8.doCall(_GrailsClasspath_groovy:130)
at _GrailsClasspath_groovy$_run_closure8.doCall(_GrailsClasspath_groovy)
at _GrailsClasspath_groovy.setClasspath(_GrailsClasspath_groovy:190)
at _GrailsClasspath_groovy$_run_closure1.doCall(_GrailsClasspath_groovy:39)
at _GrailsEvents_groovy.run(_GrailsEvents_groovy:50)
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:37)
at _GrailsInit_groovy$run.call(Unknown Source)
at _GrailsCompile_groovy$run.call(Unknown Source)
at _GrailsCompile_groovy.run(_GrailsCompile_groovy:28)
at _GrailsCompile_groovy$run.call(Unknown Source)
at Compile.run(Compile.groovy:25)
at Compile$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:606)
Error executing script Compile: loader constraint violation in interface itable initialization: when resolving method "org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of <bootloader>) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
Anyone can help me with what's gonig on? Why do I get this exception and how to fix it?
Thanks
--MB
Seems like you're entering a dependency madness. Look at your error message for this LinkageError
(I've added some emphasis):
Error executing script Compile: loader constraint violation in interface itable initialization: when resolving method "
org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;
" the class loader (instance oforg/codehaus/groovy/grails/cli/support/GrailsRootLoader
) of the current class,org/apache/xerces/dom/NodeImpl
, and the class loader (instance of ) for interfaceorg/w3c/dom/Node
have different Class objects for the typeorg/w3c/dom/NodeList
used in the signature
To make things a little more clear (if that's not already the case), there is a conflict between two of your dependencies. As you appear to use Grails, I would tend to say to you that the version of GroovyWS you use is not compatible with your current installation of Grails. Have you tried to install groovyWS using Grails command-line ? I mean, calling install-dependency
? If not, I would suggest you replace your dependecy with a call to
install-dependency org.codehaus.groovy.modules:groovyws
This way, Grails would use its own compatibility mechanism.
If that's not enough, try to see in that guide how to exclude offending dependencies.
EDIT You could also follow some advices from this blog entry.
精彩评论