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

NullPointerException after reconfiguring via JMX

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.13.0
    • Fix Version/s: 3.0.0, 2.13.1
    • Component/s: Core, JMX
    • Labels:
      None

      Description

      Load JMX GUI, go to Log4j Tab, select context, click "Reconfigure with XML below".

      the new configuration is accepted and active, but then the subsequent call to LogerContextAdmin::getConfigText() throws an NPE.

      Looking deeper, the ConfigurationSource created in LogerContextAdmin::setConfigText(...) is created in such a way that ConfigurationSource::resetInputStream(), used by getConfigText, is unable to create a duplicate of the ConfigurationSource and instead returns null.

      The constructor {{ConfigurationSource(final byte[] data, final URL url, long lastModified) }} neglects to set the data member.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bkuker1 Bill Kuker

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment