Log4j 2
  1. Log4j 2
  2. LOG4J2-51

ClassCastException in Category logger

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: log4j 1.2 emulation
    • Labels:
      None

      Description

      When a Category is "created" with the same name as a previously created log4j2 Logger, a ClassCastException occurs when calling category.l7dlog(...) and others.

      See LOG4J2-50 for additional symptoms.

        Activity

        John Vasileff made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ralph Goers made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Ralph Goers [ ralph.goers@dslextreme.com ]
        Resolution Fixed [ 1 ]
        Ralph Goers made changes -
        Comment [ Unfortunately, this patch breaks the ClassLoaderContextSelector as it will now not be able to determine what ClassLoader the Logger should be associated with. ]
        John Vasileff made changes -
        Attachment 0002-fix-for-Category.getInstance-returning-cached-Logger.patch [ 12494999 ]
        John Vasileff made changes -
        John Vasileff made changes -
        John Vasileff made changes -
        Attachment 0002-fix-for-Category.getInstance-returning-cached-Logger.patch [ 12494999 ]
        John Vasileff made changes -
        Field Original Value New Value
        Attachment 0001-add-test-for-Category-when-using-a-log4j2-Logger.patch [ 12494998 ]
        John Vasileff created issue -

          People

          • Assignee:
            Ralph Goers
            Reporter:
            John Vasileff
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development