What I'm trying to achieve
- Move Spring application (not Spring boot) from Java 8 to 17 and Tomcat 8 to 10.
Issues
After following this question I have replaced javax libraries(mostly for xml binding) with jakarta but we have a gradle script that uses xjc and is failing with the following exception and couldn't find how to fix it.
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
xjc(removeOldOutput:"yes", target: sourcesDir, binding: ${"schema"}/processPaymentBindings.jaxb{
schema(dir: schema, includes:"provider/gpos/processPayment/*.xsd)
arg(value: "-Xdefault-value"
arg(value: "-extension")
produces(dir: sourcesDir, includes: "**/*.java Do")
}
We use the following JAXB dependencies for tasks on Gradle for your reference:
- jaxb: jakarta activation
- jaxb: xmlbind
- jaxb: impl
- jaxb1: impl
- jaxb: xjc
- jaxb2: common
You'll need to add the following dependencies which used to be included in the standard JRE but are now third party jars