My Java-8 project is build using spring-boot 1.3.6 version, Which by default inherit 'log4j-core-2.4.1', but now I want to upgrade log4j-core to 2.17.1 for which I added <log4j2.version>2.17.1</log4j2.version> into pom.xml file of my project. The build runs fine but the error says:-
*ERROR org.springframework.boot.SpringApplication - Application startup failed
java.lang.NoSuchMethodError: org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(Lorg/apache/logging/log4j/core/config/ConfigurationSource;)Lorg/apache/logging/log4j/core/config/Configuration;*
Short answer: you can't.
A breaking change in log4j-core
(cf. LOG4J2-1547) renders version 2.7.0 and later incompatible with Spring Boot 1.3.x. You can either:
<properties>
<log4j2.version>2.3.2</log4j2.version>
</properties>