开发者

Is there a groovyws.jar with all his dependences?

I'm using Grails and want to use groovyws to call an web-service.

But my groovyws.jar (0.5.2) have MANY dependences that I can't solve.

Is the开发者_开发知识库re any jar with all dependences included?

Note: I tried put in BuildConfig.groovy, this

dependencies {
'org.codehaus.groovy.modules:groovyws:0.5.2'
}

but I'm getting error:

Error executing script Compile: 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 ), have different Class objects for the type org/xml/sax/Parser used in the signature


You can manually exclude xerces by:

dependencies {
    runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
        exclude: 'xerces'
    }
}


GroovyWS pulls inn CXF, which again pulls in a lot of dependencies, some of them conflicting with classes already present in Java 6. You need to exclude all these dependencies if using Java 6, to avoid errors like the one you mention.

Here's my exclude list:

compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
    excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14', 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen', 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec', 'abdera-client', 'geronimo-activation_1.1_spec'
}

Note that on Ubuntu you need jaxb-xjc and jaxb-impl after all, don't know why.


I found:

  • http://docs.codehaus.org/dosearchsite.action?queryString=groovyws+standalone

Tks a lot!

(search for "groovyws standalone")

Note: I saw this tip here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜