When upgrading from 2.8.2 to 2.9.0, we are facing the following exception when accessing the context.
Caused by: java.lang.ClassCastException: org.apache.logging.log4j.simple.SimpleLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
at org.apache.logging.log4j.core.LoggerContext.getContext(LoggerContext.java:190)
at org.apache.logging.log4j.core.config.Configurator.setLevel(Configurator.java:291)
Seems like that the context factory is incorrect and defaulted to SimpleLoggerContextFactory because of the provider is not able to find the resource META-INF/log4j-provider.properties which is missing in 2.9.0 if not wrong.
- is related to
-
LOG4J2-2033 Regression in ProviderUtil.hasProviders for 2.9.0
-
- Closed
-