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
- is related to
-
LOG4J2-539 IllegalArgumentException after editing config, pressing "Reconfigure using XML below"
- Resolved
-
LOG4J2-638 Log4j2 JMX: getConfigText in LoggerContext is not working as documented
- Resolved