最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin2浏览0评论

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'

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论