Saturday, April 13, 2024

NoClassDefFoundError JAXBException in java 11

 java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 11


java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

.

.

.

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException

.

.

.

Because In Java 11 they have completely removed from the JDK.

you can use below maven dependency to resolved this issue.

<dependency>

    <groupId>javax.xml.bind</groupId>

    <artifactId>jaxb-api</artifactId>

    <version>2.3.0</version>

</dependency>

For Gradle Projects:

compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'


No comments:

Post a Comment