You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Nathan Reynolds (JIRA)" <ji...@apache.org> on 2018/11/21 16:19:00 UTC
[jira] [Created] (LOG4J2-2513) NPE in
RollingRandomAccessFileManager.RollingRandomAccessFileManagerFactory.createManger()
Nathan Reynolds created LOG4J2-2513:
---------------------------------------
Summary: NPE in RollingRandomAccessFileManager.RollingRandomAccessFileManagerFactory.createManger()
Key: LOG4J2-2513
URL: https://issues.apache.org/jira/browse/LOG4J2-2513
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.11.1
Reporter: Nathan Reynolds
RollingRandomAccessFileManager.RollingRandomAccessFileManagerFactory.createManger() throws a NullPointerException because file is null in the following code.
{quote}if (rrm.isAttributeViewEnabled()) {
rrm.defineAttributeView(file.toPath());
}
{quote}
I think the following XML configuration can reproduce the problem.
{quote}<RollingRandomAccessFile ... filePermissions="rw-------">
<DirectWriteRolloverStrategy/>
...
</RollingRandomAccessFile>
{quote}
If I remove filePermissions from the configuration, then rrm.isAttributeViewEnabled() returns false and the NullPointerException is avoided. I tried adding fileName to RollingRandomAccessFile but this is illegal. If this were allowed, then file would be initialized earlier in the method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)