728x90
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
...
Caused by: 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 org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
...
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at app//org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
at app//org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
...
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
at app//org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
at app//org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
... 119 more
이런 에러가 발생
application.yml 파일의 MVCC=true를 삭제해주면 된다.
이유는 H2 데이터베이스가 업그레이드 되면서, MVCC가 기본으로 TRUE로 동작하도록 변경되었다고 한다.
그래서 해당 옵션이 사라져서 발생하는 에러인 것 같다.
없애니까 잘 동작한다 ㅎ
참고
JPA와 DB설정, 동작확인 과정 에러 - 인프런 | 질문 & 답변 (inflearn.com)
728x90
'Backend > Spring' 카테고리의 다른 글
SDK 17 is not compatible with the source version 17 (4) | 2023.01.09 |
---|---|
maven이란? (1) | 2023.01.09 |
Spring Framework란? (2) | 2022.12.28 |
Spring Boot Devtools 사용하기 (2) | 2022.10.01 |
intelliJ Cause: error: invalid source release: 17 해결 (2) | 2022.10.01 |