wsdl2java icon indicating copy to clipboard operation
wsdl2java copied to clipboard

Unable to load class 'com.sun.xml.bind.Utils'.

Open AxopenLyon opened this issue 3 years ago • 2 comments

Hi,

I can't run the plugin, there is an issue when running : Unable to load class 'com.sun.xml.bind.Utils'.

I'm on Java 11 and Gradle 6.8. I've tried adding the dependencies in my build.gradle, but it doesn't change anything.

My wsdl2java configuration looks like this

wsdl2java {
    wsdlDir = file("src/main/resources/wsdl")
    wsdlsToGenerate = [["$wsdlDir/naviwest.wsdl"]]
}

If you have any idea, I'm being stuck on this Thanks

AxopenLyon avatar Jul 15 '21 16:07 AxopenLyon

Hi,

have you found any solution to this?

I came across the same problem when i upgraded spring boot from 2.2.4 to 2.6.4.

I will post my solution if i find one..

Thanks

gellaig avatar Mar 10 '22 12:03 gellaig

In my case the solution was changing these lines in my dependencies:

implementation("org.jvnet.jaxb2_commons:jaxb2-basics-runtime:1.11.1")

wsdl2java("org.jvnet.jaxb2_commons:jaxb2-basics-runtime:0.11.0") wsdl2java("org.jvnet.jaxb2_commons:jaxb2-basics:0.11.0")

To these:

implementation("com.sun.xml.bind:jaxb-impl:3.0.2")

wsdl2java("com.sun.xml.bind:jaxb-impl:2.3.3")

I use spring boot 2.6.3, java 11, kotlin 1.6.10, gradle 6+, wsdl2java 0.12 i tried a lot of different versions but these worked for me.

gellaig avatar Mar 11 '22 07:03 gellaig