반응형
[Spring] Driver net.sf.log4jdbc.sql.jdbcapi.DriverSpy claims to not accept jdbcUrl 오류
스프링 기본 설정 중 log4j설정 이후부터 테스트는 잘 작동하지만 톰캣 실행 시
WARN : org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Constructor threw exception; nested exception is java.lang.RuntimeException: Driver net.sf.log4jdbc.sql.jdbcapi.DriverSpy claims to not accept jdbcUrl, jdbc:log4jdbc:oracle:thin:@localhost:1521:XE
오류발생
ojdbc6.jar을 buildpath로 직접 넣어서 잘 사용하던 프로젝트가 있는데 다른 프로젝트에서만 문제가 발생하였다.
수정 이후
**수정 이전에는 내 실수였다.
buildPath 이후 Deployment Assembly에 ojdbc6를 add 해준 이후로 해당 문제는 해결되었다.
수정 이전
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
</dependency>
pom.xml에 위 dependency 추가 후 해결되었다.
반응형
'ETC > 오류해결' 카테고리의 다른 글
Jetbrain Intellij가 실행되지 않을 때 (0) | 2021.09.08 |
---|---|
[Spring] web.xml cvc-elt.1.a: Cannot find the declaration of element 'web-app' (0) | 2021.05.26 |
log4j.xml The file cannot be validated as the XML definition 오류 (0) | 2021.05.24 |
web.xml cvc-id.3 에러 해결 (0) | 2021.05.16 |
[셀레니움,크롤링] 로컬에서 잘 되던 크롤링이 서버에서 안될때 (0) | 2021.04.25 |
[Tomcat] Starting Tomcat v8.5 Server at localhost 오류 (0) | 2021.02.06 |