|
Here's the error:
Embedded error: java.lang.reflect.InvocationTargetException loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/Parser used in the signature I'm just trying to use http-builder's RestClient to "functional" test RESTful capabilities. Here's what I've tried in the pom.xml: <dependency> <groupId>org.codehaus.groovy.modules.http-builder</groupId> <artifactId>http-builder</artifactId> <version>0.5.0-RC2</version> <exclusions> <exclusion> <artifactId>xercesImpl</artifactId> </exclusion> <exclusion> <artifactId>xmlParserAPIs</artifactId> </exclusion> <exclusion> <artifactId>xml-apis</artifactId> </exclusion> </exclusions> </dependency> I'm on MacOS X "Snow Leopard" with the latest Groovy (1.7.0) and Grails (1.2.0). Any ideas? TIA. Kit |
|
Hi
For some reason http-builder is giving an issue. I too faced the same issue. The REST plugin has built in http-builder. Install the grails REST plug-in and remove the http-builder and dependencies from your lib folder. If you are using maven(pom), you can remove the dependencies from POM. Thanks
Srinivasa Kadiyala
|
|
Isn't the REST plugin defunct? I definitely don't want to create a dependency for something that isn't supported.
|
|
The REST plug-in is not defunct I think. It is working fine for me.
The problem is some compatibility while importing an http-builder from maven repos. I suspect that it is a matter of combination of http-builder and its dependencies mis-match. The best way..is to install the rest plug-in and get rid of the http-builder from POM(If this solution is fine for your task). Other probably you might have to find the correct combination of http-builder for GRAILS and also other dependencies. It might be a bit time consuming or some one from GRAILS development team might come handy.... Good luck
Srinivasa Kadiyala
|
|
I also get this class loader issue (and the REST plugin is being decommisioned so don't want to use either) and was wondering if anybody could tell me what the issue is. Difference is I get this when trying to use BuildConfig.groovy
grails.project.dependency.resolution = { inherits( "global" ) { } log "verbose" repositories { grailsPlugins() grailsHome() mavenLocal() mavenCentral() mavenRepo "http://repository.codehaus.org" } dependencies { compile( [group:'org.codehaus.groovy.modules.http-builder', name:'http-builder', version:'0.5.0-RC2'] ) } } |
|
i found some bugs in jira that mention this issue. following the advice i tried to set all jars on my class path to use xerces 2.8.1 and xml-apis 1.3.04 but the error is the same
maybe some other jar on that class path has it in, will try to find it with jarscan |
|
despite replacing xml-apis-1.3.03.jar with xml-apis-1.3.04.jar in ~/.ivy2/cache/xml-apis/xml-apis/jars, so that it matches the other versions I have on the class path, it keeps downloading xml-apis-1.3.03.jar. I'm not sure if this is the cause but it sounds like a good bet
|
|
Please guys, I'm at a loss.
I'm trying to run my canoo tests that ran fine with 1.1 but now I've upgraded I get this loader constraint violation. I can see an issue (5500, with 1 vote from me) in jira for this but it's not listed in any release notes, so the earliest it can be resolved seems to be 2.0 which has no date. Until then I'm constrained to using an old version of grails unless somebody has a work around, that doesn't require xml-apis-1.3.03, hence http-builder. I use http-builder for making RESTful calls. |
|
This post was updated on .
In reply to this post by iouatp
CONTENTS DELETED
The author has deleted this message.
|
|
This post has NOT been accepted by the mailing list yet.
many thanks Gustavo
will try when we attempt another upgrade from grails 1.1.1 to latest |
|
This post has NOT been accepted by the mailing list yet.
Hi,
I've got the same problem Error executing script RunApp: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/Parser used in the signature java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type org/xml/sax/Parser used in the signature we hope that grails people fix it soon ... |
| Powered by Nabble | Edit this page |
