You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2019/05/07 05:07:00 UTC

[jira] [Resolved] (LOG4J2-2597) StackOverflowError at org.apache.logging.log4j.LogManager.getContext()

     [ https://issues.apache.org/jira/browse/LOG4J2-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved LOG4J2-2597.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.12.0

A LoggingException will now be thrown if getLogger is called and both log4j-slf4j-impl and log4j-to-slf4j are present. Please verify and close.

> StackOverflowError at org.apache.logging.log4j.LogManager.getContext()
> ----------------------------------------------------------------------
>
>                 Key: LOG4J2-2597
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2597
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.11.2
>            Reporter: Gary Gregory
>            Priority: Major
>             Fix For: 2.12.0
>
>
> I encountered:
> {noformat}
> java.lang.StackOverflowError
> 	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
> 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
> 	at org.apache.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:39)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:37)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:29)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:52)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
> 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
> 	at org.apache.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:39)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:37)
> 	at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:29)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:52)
> {noformat}
> We should either guard against this kind of problem or make it easy to find in our docs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)