반응형
spring boot로 프로그램 개발 시, java 8에서 상위 버전으로 업그레이드를 한 경우 다음과 같은 에러가 발생할 수 있습니다.
ClassNotFoundException: JAXBException
JAXBException의 발생 원인
JAXB API는 Java EE(Enterprise Edition) API로 간주되며 자바 9 버전부터는 더 이상 포함되지 않습니다. 게다가 자바 11부터는 JDK에서 완전히 삭제되었다고 합니다.
JAXBException 해결 방법
라이브러리가 빠진 것이기 때문에 별도로 라이브러리를 다음과 같이 포함하면 됩니다.
<!-- maven 예시 -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
// gradle 예시
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
728x90
반응형
'back end > java' 카테고리의 다른 글
Windows에 Springboot Service 등록하는 방법 (0) | 2023.02.06 |
---|---|
[java] Get the "last modified" date from a file (0) | 2023.01.07 |
How to append text to an existing file in Java? (0) | 2023.01.01 |
java - Find a line in a file and remove it (0) | 2023.01.01 |
[Spring] MariaDB log4jdbc Cannot create JDBC driver error (2) | 2022.12.22 |