• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

라이브러리간 호환 문제

20.03.12 05:10 작성 조회수 485

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 정보는 빼고 의존성을 추가하세요. 스프링 부트 의존성 관리 기능에 의해 자동으로 스프링 부트와 호환되는 버전으로 가져와 사용하게 됩니다.