Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-167

ClassCastException from SimpleLoggerContext to core.LoggerContext, since it implements spi.LoggerContext

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta5
    • Fix Version/s: 2.0-beta5
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              ralph.goers@dslextreme.com Ralph Goers
              Reporter:
              schellhammer Eric Schellhammer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: