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

NullPointerException at org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager.writeInternal(JdbcDatabaseManager.java:803)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.2
    • Fix Version/s: 3.0.0, 2.12.0
    • Component/s: Core
    • Labels:
      None

      Description

      A NullPointerException can be thrown at org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager.writeInternal(JdbcDatabaseManager.java:803)

      This seems to happen if writeInternal() runs at the same time as either a reconnect or the appender shutting down.

      2019-05-21 19:16:36,913 qtp546045276-4680 ERROR An exception occurred processing Appender JDBC-Response org.apache.logging.log4j.core.appender.AppenderLoggingException: Unable to write to database in appender: null
              at org.apache.logging.log4j.core.appender.db.AbstractDatabaseAppender.append(AbstractDatabaseAppender.java:118)
              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:464)
              at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:448)
              at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:431)
              at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:406)
              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.tryLogMessage(AbstractLogger.java:2170)
              at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2125)
              at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2108)
              at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1827)
              at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1281)
              <SNIP/>
      Caused by: java.lang.NullPointerException
              at org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager.writeInternal(JdbcDatabaseManager.java:803)
              at org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager.writeThrough(JdbcDatabaseManager.java:823)
              at org.apache.logging.log4j.core.appender.db.AbstractDatabaseManager.write(AbstractDatabaseManager.java:264)
              at org.apache.logging.log4j.core.appender.db.AbstractDatabaseAppender.append(AbstractDatabaseAppender.java:110)
              ... 45 more
      

        Attachments

          Activity

            People

            • Assignee:
              ggregory Gary D. Gregory
              Reporter:
              ggregory Gary D. Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: