NoSuchMethodError in log4j issue
During one of our deployment, we faced this issue where a spring-boot application failed to start.
Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.apache.log4j.net.SocketAppender.getThreshold()Lorg/apache/log4j/Priority;
Problem is this is working locally without any issue. It turns out there are some conflicts with different loggers used by springboot and our own modules. To fix this, we checked first which module is using log4j-over-slf4j and added it as an exclusion ie
I got it here.