nilsmagnus / wsdl2java

Gradle plugin for generating java source from wsdl files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

AxopenLyon opened this issue · 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

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

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.