[
https://issues.apache.org/jira/browse/LOG4J2-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033070#comment-17033070
]
ASF subversion and git services commented on LOG4J2-2770:
---------------------------------------------------------
Commit 50322a666422a89d9523e69b608f6ae3fa2245a2 in logging-log4j2's branch
refs/heads/release-2.x from Bill Kuker
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=50322a6 ]
Log4j 2LOG4J2-2770 Fix NPE in JMX reconfiguration (#337)
* Update ConfigurationSource.java
I think this needs to store the data so that resetInputStream() works.
The jmx function LoggerContextAdmin::getConfigText throws a NPE if you have
previously called LoggerContextAdmin::setConfigText
* Do not set data if URL is provided
Avoids changing behavior of resetInputStream in cases that currently
work correctly.
> NullPointerException after reconfiguring via JMX
> ------------------------------------------------
>
> Key: LOG4J2-2770
> URL: https://issues.apache.org/jira/browse/LOG4J2-2770
> Project: Log4j 2
> Issue Type: Bug
> Components: Core, JMX
> Affects Versions: 2.13.0
> Reporter: Bill Kuker
> Priority: Major
> Fix For: 3.0.0, 2.13.1
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)