logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-167) ClassCastException from SimpleLoggerContext to core.LoggerContext, since it implements spi.LoggerContext
Date Mon, 04 Mar 2013 00:03:12 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ralph Goers resolved LOG4J2-167.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-beta5
         Assignee: Ralph Goers

Configurator will no longer throw a ClassCastException. Instead, it will log an error and
return null to the caller since Configurator must have a core LoggerContext, not a SimpleLoggerContext.
                
> ClassCastException from SimpleLoggerContext to core.LoggerContext, since it implements
spi.LoggerContext
> --------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-167
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-167
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-beta5
>            Reporter: Eric Schellhammer
>            Assignee: Ralph Goers
>             Fix For: 2.0-beta5
>
>
> When calling Configurator.initialize(<Name>, null, <File>) it calls LogManager.getContext(loader,
false) and if no logging implementation can be found this method returns a new SimpleLoggerContext
(created by the factory which in turn is created in the static part of the class). This class
implements spi.LoggerContext but the Configurator tries to cast it to core.LoggerContext,
which fails since SimpleLoggerContext does not extend that class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message