[ 
https://issues.apache.org/jira/browse/LOG4J2-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16154122#comment-16154122
 ] 

Ralph Goers commented on LOG4J2-2030:
-------------------------------------

It didn't occur to me to leave the old version of the binding in place.  I'd be 
interested in knowing about your use case so we can figure out how to tell 
ServiceLoader to use it instead of the ThreadContextClassLoader.

> ClassCastException: org.apache.logging.log4j.simple.SimpleLoggerContext 
> cannot be cast to org.apache.logging.log4j.core.LoggerContext
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2030
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2030
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.9.0
>            Reporter: jncharpin
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to