Grails 1.3.2 and GroovyWS dependency problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 1.3.2 and GroovyWS dependency problem

davidk

I'm using Grails 1.3.2 in combination with th CXF Plugin to publish web
services. GroovyWS is also used to cosuming a web service. After upgrading
to 1.3.2 some dependency problems occurs. With the GroovyWS service class
following exception occurs:

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving interface method
"org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
the class loader (instance of
org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
<bootloader>) for resolved class, org/w3c/dom/Node, have different Class
objects for the type org/w3c/dom/UserDataHandler used in the signature

I suppose the CXF libraries and GroovyWS have duplicate classes. i have done
the dependency report, but can not find any w3c related libs. i hobe some
can help me. thx in advance.

with grails 1.1.1 i had no problems usind cxf and groovyws parallel. maybe
there are conflicts with standard grails libs.
--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-1-3-2-and-GroovyWS-dependency-problem-tp2272685p2272685.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

rlovtangen
Have you upgraded to Java 1.6 in the same go? Some of these classes are now part of Java 1.6, and it's a pita to find and exclude all dependencies that conflicts with Java 1.6.
Here is my list of excludes for groowyws (maven syntax):


                <dependency>
                        <groupId>org.codehaus.groovy.modules</groupId>
                        <artifactId>groovyws</artifactId>
                        <version>0.5.2</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>org.apache.geronimo.specs</groupId>
                                        <artifactId>geronimo-servlet_2.5_spec</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>org.mortbay.jetty</groupId>
                                        <artifactId>servlet-api</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>com.sun.xml.bind</groupId>
                                        <artifactId>jaxb-xjc</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>com.sun.xml.bind</groupId>
                                        <artifactId>jaxb-impl</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>xml-apis</groupId>
                                        <artifactId>xml-apis</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>com.sun.xml.messaging.saaj</groupId>
                                        <artifactId>saaj-impl</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>

and for CXF:

                        <dependency>
                                <groupId>org.apache.cxf</groupId>
                                <artifactId>cxf-bundle</artifactId>
                                <version>2.2.7</version>
                                <exclusions>
                                        <exclusion>
                                                <groupId>org.slf4j</groupId>
                                                <artifactId>slf4j-jdk14</artifactId>
                                        </exclusion>
                                        <exclusion>
                                                <groupId>xerces</groupId>
                                                <artifactId>xmlParserAPIs</artifactId>
                                        </exclusion>
                                        <exclusion>
                                                <groupId>javax.xml.bind</groupId>
                                                <artifactId>jaxb-api</artifactId>
                                        </exclusion>
                                        <exclusion>
                                                <groupId>javax.xml.soap</groupId>
                                                <artifactId>saaj-api</artifactId>
                                        </exclusion>
                                        <!--<exclusion>-->
                                                <!--<groupId>xerces</groupId>-->
                                                <!--<artifactId>xercesImpl</artifactId>-->
                                        <!--</exclusion>-->
                                        <exclusion>
                                                <groupId>org.apache.xmlbeans</groupId>
                                                <artifactId>xmlbeans</artifactId>
                                        </exclusion>
                                        <exclusion>
                                                <groupId>jaxen</groupId>
                                                <artifactId>jaxen</artifactId>
                                        </exclusion>
                                        <exclusion>
                                                <groupId>org.apache.geronimo.specs</groupId>
                                                <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                                        </exclusion>
                                </exclusions>
                        </dependency>

Ronny

On Jun 30, 2010, at 10:43 AM, davidk wrote:

>
> I'm using Grails 1.3.2 in combination with th CXF Plugin to publish web
> services. GroovyWS is also used to cosuming a web service. After upgrading
> to 1.3.2 some dependency problems occurs. With the GroovyWS service class
> following exception occurs:
>
> Caused by: java.lang.LinkageError: loader constraint violation: when
> resolving interface method
> "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature
>
> I suppose the CXF libraries and GroovyWS have duplicate classes. i have done
> the dependency report, but can not find any w3c related libs. i hobe some
> can help me. thx in advance.
>
> with grails 1.1.1 i had no problems usind cxf and groovyws parallel. maybe
> there are conflicts with standard grails libs.
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-1-3-2-and-GroovyWS-dependency-problem-tp2272685p2272685.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

Joe Abrams
Thank you very much for this post !

I'd been trying to move away from the GroovyWS 0.5.0 minimal jar for some
time and this information did the trick.

Regards,
Joe
Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

drizzt

Joe Abrams wrote
Thank you very much for this post !

I'd been trying to move away from the GroovyWS 0.5.0 minimal jar for some
time and this information did the trick.

Regards,
Joe
Hi,

i have the same problem

in which file i have to add this dependency exclusions?

Regards,
Christoph
Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

Joe Abrams
It would depend on what tool you are using to manage your dependencies.   At our site we
use Maven  and the grails-maven-plugin, so the exclusions discussed would happen in pom.xml.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

drizzt
yeah it works!

i use maven for the first time - it's cool

thx
Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

sul123
In reply to this post by rlovtangen
Hello Ronny
can you give the sample syntax for these exclusion when using the BuildConfig.groovy

for example what the syntax for this would be, since the exclusion is  a group

 <dependency> 
                        <groupId>org.codehaus.groovy.modules</groupId> 
                        <artifactId>groovyws</artifactId> 
                        <version>0.5.2</version> 
                        <exclusions> 
                                <exclusion> 
                                        <groupId>org.apache.geronimo.specs</groupId> 
                                        <artifactId>geronimo-servlet_2.5_spec</artifactId> 
                                </exclusion> 
                                <exclusion>
Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

rlovtangen
See Chapter 3.7, http://grails.org/doc/latest/guide/3.%20Configuration.html#3.7%20Dependency%20Resolution
I think the documentation is lacking here, should have more examples of usage. The only example of excluding a jar I can see in the documentation is javassist, which is unfortunate since javassist has the same group and name (javassist:javassist).
So I don't know if it is

compile( "org.codehaus.groovy.modules:groovyws:0.5.2" ) {
excludes "geronimo-servlet_2.5_spec"
}

or 


compile( "org.codehaus.groovy.modules:groovyws:0.5.2" ) {
excludes "org.apache.geronimo.specs"
}

or


compile( "org.codehaus.groovy.modules:groovyws:0.5.2" ) {
excludes "org.apache.geronimo.specs:geronimo-servlet_2.5_spec"
}

Ronny

On Aug 3, 2010, at 7:09 AM, sul123 wrote:


Hello Ronny
can you give the sample syntax for these exclusion when using the
BuildConfig.groovy

for example what the syntax for this would be, since the exclusion is  a
group

<dependency>
                       <groupId>org.codehaus.groovy.modules</groupId>
                       <artifactId>groovyws</artifactId>
                       <version>0.5.2</version>
                       <exclusions>
                               <exclusion>

<groupId>org.apache.geronimo.specs</groupId>

<artifactId>geronimo-servlet_2.5_spec</artifactId>
                               </exclusion>
                               <exclusion>

--
View this message in context: http://grails.1312388.n4.nabble.com/Grails-1-3-2-and-GroovyWS-dependency-problem-tp2273324p2311329.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Grails 1.3.2 and GroovyWS dependency problem

pledbrook
> compile( "org.codehaus.groovy.modules:groovyws:0.5.2" ) {
> excludes "geronimo-servlet_2.5_spec"
> }

This one. You specify the artifact ID/module name. It may be possible
to include the group/organisation as well, but I haven't tried.

Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email