[ https://issues.apache.org/jira/browse/LOG4J2-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17721630#comment-17721630 ]
David Smiley commented on LOG4J2-2969: -------------------------------------- FYI still an issue with 2.20.0. The code calling Log4j2 APIs above is Apache Solr: https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/logging/log4j2/Log4j2Watcher.java (different line numbers from the report above but the logic hasn't notably changed) > NPE at getContextMap() in RingBufferLogEvent > -------------------------------------------- > > Key: LOG4J2-2969 > URL: https://issues.apache.org/jira/browse/LOG4J2-2969 > Project: Log4j 2 > Issue Type: Bug > Affects Versions: 2.13.0 > Reporter: Nazerke Seidan > Priority: Major > > In our log4j2.xml configuration we use sync logging (Loggers, Root) for > testing purpose, then we switch to async logging by setting > *Dlog4j2.contextSelector* to > *org.apache.logging.log4j.core.async.AsyncLoggerContextSelector* > But then we get NPE when we browse log history on Solr Admin UI : > at > org.apache.logging.log4j.core.async.RingBufferLogEvent.getContextMap(RingBufferLogEvent.java:345) > at > org.apache.solr.logging.log4j2.Log4j2Watcher.toSolrDocument(Log4j2Watcher.java:281) > at > org.apache.solr.logging.log4j2.Log4j2Watcher.toSolrDocument(Log4j2Watcher.java:45) > at org.apache.solr.logging.LogWatcher.getHistory(LogWatcher.java:98) > at > org.apache.solr.handler.admin.LoggingHandler.handleRequestBody(LoggingHandler.java:118) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:214) > where we call contextData.toMap() in getContextMap() > > -- This message was sent by Atlassian Jira (v8.20.10#820010)