상황 : Spring jUnit(JPA 테스트 코드) 테스트에서 아래와 같은 에러 발생
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
...
해결 : build.gradle 에서 H2 데이터베이스 의존성 재설치
클래스 어노테이션의 문제인 줄 알았으나, 그냥 gradle 설치가 제대로 안되었던 걸로...^^;;
728x90
반응형
'ETC > Errors' 카테고리의 다른 글
[VirtualBox] 가상 머신에서 마우스 왼쪽(좌클릭)이 안될 때 (0) | 2021.06.23 |
---|---|
vi 에디터 사용 중 readonly로 인한 저장 불가(E45: 'readonly' option is set (add ! to override)) (0) | 2021.06.20 |