[Java/오류노트] Solved - Could not create plugin of type class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.NoClassDefFoundError: com/lmax/di..
[Java/오류노트] Solved - Could not create plugin of type class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.NoClassDefFoundError: com/lmax/di..
adjh54
2024. 1. 17. 16:34
728x170
해당 글에서는 Log4j2에서 비동기 로깅에 대해 설정하는 과정 중에 발생하는 오류에 대한 해결한 방법에 대해 공유합니다.
1) 문제점
💡 문제점
- Log4j2에서 ‘비동기 로깅’과 관련되어 테스트를 하는 중에 아래와 같은 문제가 발생하였습니다.
Could not create plugin of type class org.apache.logging.log4j.core.async.AsyncLoggerConfig for element AsyncLogger: java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory java.lang.NoClassDefFoundError: com/lmax/disruptor/EventFactory
- 해당 문제는 AsyncLogger를 사용하는데 com.lmax:disruptor 클래스를 찾을 수 없다는 문제입니다.
2) 해결방법
💡 해결방법
- 공식사이트 내에서도 Log4j2에서 비동기 로깅을 사용하려면 ‘LMAX Disruptor’를 사용하라는 권장을 하고 있습니다. - 그렇기에 이를 설치하여 해결합니다.