Software Workshop

Spring boot 프로젝트에서 JDK 9 이상을 사용할 때, 다음과 같은 에러를 만날 수 있음

Error creating bean with name 'entityManagerFactory' defined in class path resource org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError javax/xml/bind/JAXBException

Java 9부터 JAXB API가 지원되지 않으면서 생기는 문제로, 다음과 같은 dependency를 추가하면 해결됨

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