xsd - Getting `java.lang.ClassNotFoundException: org.jvnet.jaxb.lang.Equals` after upgrading to jakarta and Java 17 - Stack Over

I'm trying to update my application from javaxjava8 to jakartajava17. In the process I also upda

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?

Share Improve this question edited Apr 1 at 9:37 tony asked Mar 28 at 12:22 tonytony 1,6714 gold badges20 silver badges39 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You 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'

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744037833a4547756.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信