admin 管理员组

文章数量: 1086019

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'

本文标签:

Error[2]: Invalid argument supplied for foreach(), File: /www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm, Line: 58
File: /www/wwwroot/roclinux.cn/tmp/route_read.php, Line: 205, include(/www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm)
File: /www/wwwroot/roclinux.cn/tmp/index.inc.php, Line: 129, include(/www/wwwroot/roclinux.cn/tmp/route_read.php)
File: /www/wwwroot/roclinux.cn/index.php, Line: 29, include(/www/wwwroot/roclinux.cn/tmp/index.inc.php)