0

I was using cxf-rt-transports-http v2.2.10 dependency on my project, when I update it to cxf-rt-transports-http v3.5.5, all my test cases and code keep giving me below error.

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>2.2.10</version>
</dependency>

To

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-rt-transports-http</artifactId>
    <version>3.5.5</version>
</dependency>

I am getting below error.

Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.model.WrapperBeanGenerator

When I compare dependency tree:

[INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:2.2.10:compile
[INFO] |  +- org.apache.cxf:cxf-api:jar:2.2.10:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0.2:compile
[INFO] |  |  +- org.apache.cxf:cxf-common-utilities:jar:2.2.10:compile
[INFO] |  |  |  \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] |  |  +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.5:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.1.1:compile
[INFO] |  |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] |  |  +- org.apache.neethi:neethi:jar:2.0.4:compile
[INFO] |  |  \- org.apache.cxf:cxf-common-schemas:jar:2.2.10:compile
[INFO] |  \- org.apache.cxf:cxf-rt-core:jar:2.2.10:compile
[INFO] |     \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.6:compile

with new version

[INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:3.5.5:compile
[INFO] |  \- org.apache.cxf:cxf-core:jar:3.5.5:compile
[INFO] |     +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:compile
[INFO] |     |  +- org.glassfish.jaxb:txw2:jar:2.3.5:compile
[INFO] |     |  \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] |     +- org.apache.ws.xmlschema:xmlschema-core:jar:2.3.0:compile
[INFO] |     \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile

1 Answer 1

0

In my project, I was using jaxws-rt v2.2.8, when I was playing with the various versions etc, by adding jaxws-rt v2.2.10 worked, all test cases and app is working fine.

<dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-rt</artifactId>
    <version>2.2.10</version>
</dependency>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.