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

Merging configurations fail with an NPE when comparing Nodes with different attributes

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7
    • Configurators
    • None

    Description

      When you pass two configurations and there are different Nodes in the Root logger a NPE gets thrown.

      Example stub configuration 1

      <Loggers>
        <Root level="...">
          <AppenderRef ref="STDOUT">
          <Property name="hostname">server1</Property>
        </Root>
      </Loggers>
      

      Example stub configuration 2

      <Loggers>
        <Root level="...">
          <AppenderRef ref="STDOUT">
          <AppenderRef ref="File">
        </Root>
      </Loggers>
      

      Failure happens because DefaultMergeStrategy.isSameName() and isSameReference() calls get() without checking for null.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            leonj1 Jose Leon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment