반응형 Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 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 Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException중요한 에러 부분 요약 1) 첫 번째 시도 참고 : https://velog.io/@2yeseul/Spring-Boot-JPA-MySQL-%EC%97%B0%EB%8F%99 Spring Boot - JPA - MySQL 연동 Spring Boot - JPA - MySQL 연동 참고한 블로그 글입니다.(https://devlab.neonkid.xyz/2018/06/06/spring/2018-06-06-Spring-boot-에서-DBMS를-연동하는-방법-JPA-기본편/)) (소소한 삽질을 해서 정리해두는 글..) 1. build.gradle velog.io spring.jpa.database=mysqlapplication.properties에 추가했지만 실패.. 2) 두 번째 시도(해결!!!!) 참고: https://madplay.github.io/post/java9-jaxb-exception-in-springboot Java 9로 스프링 부트 프로젝트를 실행할 때 ClassNotFoundException: JAXBException 오류 해결하기 Java 9로 업그레이드 했더니, 스프링 부트 프로젝트를 실행시 오류가 발생한다. 어떻게 해야 할까? madplay.github.io compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'build.gradle의 dependencies에 추가함 728x90 반응형 'Framework > Spring' 카테고리의 다른 글
회사에서 일했던 환경을 직접 하나하나 적용해보고 코딩해보고 싶은 마음에 하나하나 적용해보던 중에 boot를 start up 하면 entityManagerFactory의 bean을 생성하지 못해 Error가 발생하였다. 원인은 Open-jdk에서 javassist가 포함되지 않아 문제가 발생하는 것이였다. 그래서 Dependencies에 javassist를 추가해주면 된다. 만약 Gradle을 사용한다면 아래의 코드를 입력한다. implementation group: 'org.javassist', name: 'javassist', version: '3.15.0-GA'만약 Maven을 사용한다면 아래의 코드를 입력한다. <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.23.1-GA</version> </dependency>저작자표시비영리 'Spring 스프링' 카테고리의 다른 글
When I compiled my spring project, I got the following ERROR:- Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failedI am using STS Eclipse and MySql Database How do I fix Error creating bean with name EntityManagerFactory?Error creating bean with name 'entityManagerFactory' defined in class path resource. Resolved this error by adding a Bean to the main application class.
What is Entity Manager Factory?EntityManagerFactory class is a factory for EntityManager s. EntityManager : The javax. persistence. EntityManager is the primary JPA interface used by applications. Each EntityManager manages a set of persistent objects, and has APIs to insert new objects and delete existing ones.
|