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

NullPointerException after reconfiguring via JMX

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.13.0
    • 3.0.0, 2.13.1
    • Core, JMX
    • 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

              Unassigned Unassigned
              bkuker1 Bill Kuker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: