프로그래밍/MyBatis
log4jdbc에러 - Property 'driverClassName' threw exception; nested exception is java.lang.NoClassDefFoundError
Youngs_
2021. 12. 3. 16:41
Log4j2는 api와 core로 나누어져있다. (참고: https://logging.apache.org/log4j/2.x/maven-artifacts.html)
Property 'driverClassName' threw exception; nested exception is java.lang.NoClassDefFoundError 에러가 날땐
Log4j-api와 Log4j-core 메이븐을 추가하면 해결된다.
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0.1</version>
</dependency>