강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

hp님의 프로필 이미지
hp

작성한 질문수

스프링 데이터 JPA

JPA 프로그래밍 1. 프로젝트 세팅

라이브러리간 호환 문제

작성

·

635

0

안녕하세요.

스프링부트 2.0.4와 MySQL 8로 이번 강의 실습을 진행하다가

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

라는 에러가 발생해서 스프링부트 버전을 2.2.5로 바꾸고 정상적으로 동작하는걸 확인했습니다.

spring-boot-starter-data-jpa가 가져오는 의존성들중 어떤것이 MySQL 8점대와 호환되지 않았던건지 확인하고싶은데 어디서부터 알아봐야할지 감이 잡히지 않습니다.

조언부탁드립니다.

답변 1

0

백기선님의 프로필 이미지
백기선
지식공유자

스프링 부트가 버전이 있을겁니다. 메이븐을 사용하신다면 version 정보는 빼고 의존성을 추가하세요. 스프링 부트 의존성 관리 기능에 의해 자동으로 스프링 부트와 호환되는 버전으로 가져와 사용하게 됩니다.

hp님의 프로필 이미지
hp

작성한 질문수

질문하기