You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My build.gradle is like this:
...
...
xjc {
xjcVersion.set("3.0.0")
xsdDir.set(layout.projectDirectory.dir("src/main/resources/xsd"))
defaultPackage.set("com.xx.xxx.xxxx.model")
}
$ ./gradlew xjc --info
_*** What went wrong:
Execution failed for task ':integration:lib:restvalidation:validationManager:xjc'.
A failure occurred while executing com.github.bjornvester.xjc.XjcWorker
jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]**_
I am using 1.5.1 version.
classpath group: 'gradle.plugin.com.github.bjornvester', name:'xjc-gradle-plugin', version: '1.5.1'
The reason I want to use 3.0.0 version as I want to generate classes with jakarta imports.
If I don't use xjcVersion, then i don't see any issue but it creates files with javax.xml.bind.* and it's not compatible with other part of the code.
Can you please suggest why is it failing and is there anything else I need to do?
We had the same issue with Java 16, Gradle 7.1.1. Like @SantoshKumar4 we were able to get it to work with the default xjcVersion, but we would really like it to work with xjcVersion=3.0.1.
My build.gradle is like this:
...
...
xjc {
xjcVersion.set("3.0.0")
xsdDir.set(layout.projectDirectory.dir("src/main/resources/xsd"))
defaultPackage.set("com.xx.xxx.xxxx.model")
}
$ ./gradlew xjc --info
_*** What went wrong:
Execution failed for task ':integration:lib:restvalidation:validationManager:xjc'.
I am using 1.5.1 version.
classpath group: 'gradle.plugin.com.github.bjornvester', name:'xjc-gradle-plugin', version: '1.5.1'
The reason I want to use 3.0.0 version as I want to generate classes with jakarta imports.
If I don't use xjcVersion, then i don't see any issue but it creates files with javax.xml.bind.* and it's not compatible with other part of the code.
Can you please suggest why is it failing and is there anything else I need to do?
Command: C:\Java\java-11-openjdk-11.0.11.9-1.windows.redhat.x86_64\bin\java.exe --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx3072m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\xxxx.gradle\wrapper\dists\gradle-7.1-all\1esmmb218muptbc8q7pychb8t\gradle-7.1\lib\gradle-launcher-7.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.1
The text was updated successfully, but these errors were encountered: