새소식

Framework/🍃 Spring

[Solved] java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

728x90

🔥 Problem

👉 Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

🔎 info) JAXB is a Java API that displays Java classes in XML.

Cause of error

👉 You cannot use the JAXB API in Java 9 and later versions, as it has been removed (deprecated).

🧙 Solution

👉 Please write the code below in pom.xml

<dependency>
    <groupId>javax.xml.bind</groupId>
     <artifactId>jaxb-api</artifactId>
    <version>2.3.0</version>
</dependency>

 

 

👉 If you are using Gradle, please write the code below.

implementation 'javax.xml.bind:jaxb-api:2.3.0'

 

Did my writing help you?

Please press the thumb-up button
If you have any questions, please leave them in the comments

💯포스트 후원하기
반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.