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

An exception occurred processing Appender RollingFileMain java.lang.NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8.1
    • Component/s: None
    • Labels:
      None

      Description

      Extract from the config:

              <RollingFile name="RollingFileMain" fileName="bls-neo4j.log"
                           filePattern="bls-neo4j-%d{yyyy-MM-dd-HH-mm}.log">
                  <PatternLayout>
                      <Pattern>%level{length=1} %d{yyyy-MM-dd HH:mm:ss} %c{-3} (%F:%L) %m%n</Pattern>
                  </PatternLayout>
                  <Policies>
                      <TimeBasedTriggeringPolicy/>
                  </Policies>
                  <DefaultRolloverStrategy max="2"/>
                  <Filters>
                      <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                      <ThresholdFilter level="trace" onMatch="DENY" onMismatch="NEUTRAL"/>
                  </Filters>
              </RollingFile>
      

      On startup I get the following exception:

      2017-02-14 09:47:01,935 main ERROR An exception occurred processing Appender RollingFileMain java.lang.NullPointerException
      	at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:107)
      	at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:96)
      	at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:89)
      	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purgeAscending(DefaultRolloverStrategy.java:212)
      	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purge(DefaultRolloverStrategy.java:199)
      	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.rollover(DefaultRolloverStrategy.java:326)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:310)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:227)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:207)
      	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:267)
      	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
      	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
      	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
      	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433)
      	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417)
      	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403)
      	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
      	at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
      	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091)
      	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1988)
      	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1960)
      	at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1297)
      	at de.busliniensuche.neo.MainKt.main(Main.kt:48)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cypressious Kirill Rakhman
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: