I'm trying to update my application from javax/java8
to jakarta/java17
. In the process I also updated the jaxb
packages.
My build.gradle
has, among else, these dependencies:
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
implementation '.glassfish.jaxb:jaxb-runtime:4.0.5'
implementation '.jvnet.jaxb:jaxb-plugins-runtime:4.0.8'
implementation '.jvnet.jaxb:jaxb-plugins-tools:4.0.8'
implementation '.jvnet.jaxb:jaxb-plugins:4.0.8'
They're all at their latest version.
When initializing the application I'm getting this error:
Caused by: java.lang.NoClassDefFoundError: /jvnet/jaxb/lang/Equals
Caused by: java.lang.ClassNotFoundException: .jvnet.jaxb.lang.Equals
Why is .jvnet.jaxb.lang.Equals
not found when I include all the dependencies?
I'm trying to update my application from javax/java8
to jakarta/java17
. In the process I also updated the jaxb
packages.
My build.gradle
has, among else, these dependencies:
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
implementation '.glassfish.jaxb:jaxb-runtime:4.0.5'
implementation '.jvnet.jaxb:jaxb-plugins-runtime:4.0.8'
implementation '.jvnet.jaxb:jaxb-plugins-tools:4.0.8'
implementation '.jvnet.jaxb:jaxb-plugins:4.0.8'
They're all at their latest version.
When initializing the application I'm getting this error:
Caused by: java.lang.NoClassDefFoundError: /jvnet/jaxb/lang/Equals
Caused by: java.lang.ClassNotFoundException: .jvnet.jaxb.lang.Equals
Why is .jvnet.jaxb.lang.Equals
not found when I include all the dependencies?
1 Answer
Reset to default 0You shouldn't include the following since they are designed for JAXB2.3 and not JAXB4
implementation '.jvnet.jaxb:jaxb2-basics:2.0.14'
implementation '.jvnet.jaxb:jaxb2-basics-runtime:2.0.14'
The class .jvnet.jaxb.lang.Equals
is in .jvnet.jaxb:jaxb-plugins-runtime
module. Could you try again without the modules above ?
EDIT
You should also make sure that the following is one of your project dependency too :
implementation '.jvnet.jaxb:jaxb-plugins-runtime:4.0.8'