You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Priya Ahuja <pr...@gmail.com> on 2015/12/11 02:55:10 UTC

Recursive call to appender stackoverflow error

Hi,

Any idea why I am seeing stackoverflow error? I am using log4j2 and LOGFILE
is my rolling file appender.

Exception in thread
"pool-28-thread-2-workitem-HOST-cf95a544-c4b1-4084-861b-80e4ed4f4045-workitem-HOST-56de5b12-2d80-49c8-8b21-90433c89a2a1"
java.lang.StackOverflowError
Exception in thread
"pool-37-thread-1-workitem-HOST-ba35b9e4-1c83-4a42-af8a-6902f2eed941"
java.lang.StackOverflowError
2015-12-10 17:22:11,041 ERROR Recursive call to appender LOGFILE
2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
Exception in thread
"pool-37-thread-2-workitem-HOST-5162cb6e-16bc-4754-a44b-1947e441a3b5-workitem-HOST-ff45f0c7-e25e-48f8-ba7c-199912c015ac"
java.lang.StackOverflowError
at
org.apache.logging.log4j.spi.AbstractLogger.isTraceEnabled(AbstractLogger.java:591)


Thanks,
Priya Ahuja

Re: Recursive call to appender stackoverflow error

Posted by Ralph Goers <ra...@dslextreme.com>.
The error message regarding the recursive call indicates that an appender is logging an event which is being routed to the same appender.  Log4j detects that and ignores the logging event.  But without seeing a stack trace it would be impossible to guess what is going on. I can’t even tell what Appender(s) is/are involved based on the information provided.

Ralph

> On Dec 10, 2015, at 6:55 PM, Priya Ahuja <pr...@gmail.com> wrote:
> 
> Hi,
> 
> Any idea why I am seeing stackoverflow error? I am using log4j2 and LOGFILE
> is my rolling file appender.
> 
> Exception in thread
> "pool-28-thread-2-workitem-HOST-cf95a544-c4b1-4084-861b-80e4ed4f4045-workitem-HOST-56de5b12-2d80-49c8-8b21-90433c89a2a1"
> java.lang.StackOverflowError
> Exception in thread
> "pool-37-thread-1-workitem-HOST-ba35b9e4-1c83-4a42-af8a-6902f2eed941"
> java.lang.StackOverflowError
> 2015-12-10 17:22:11,041 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> Exception in thread
> "pool-37-thread-2-workitem-HOST-5162cb6e-16bc-4754-a44b-1947e441a3b5-workitem-HOST-ff45f0c7-e25e-48f8-ba7c-199912c015ac"
> java.lang.StackOverflowError
> at
> org.apache.logging.log4j.spi.AbstractLogger.isTraceEnabled(AbstractLogger.java:591)
> 
> 
> Thanks,
> Priya Ahuja



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Recursive call to appender stackoverflow error

Posted by Priya Ahuja <pr...@gmail.com>.
I only have log4j-slf4j-impl

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${log4j.version}</version>
        </dependency>


On Fri, Dec 11, 2015 at 1:52 PM, Remko Popma <re...@gmail.com> wrote:

> Did this resolve the problem?
>
> On Friday, 11 December 2015, Remko Popma <re...@gmail.com> wrote:
>
> > You may have both the log4j-to-slf4j adapter jar and the log4j-slf4j-impl
> > jar on the classpath. They will route calls to each other. You need to
> > remove one of them.
> >
> > Sent from my iPhone
> >
> > > On 2015/12/11, at 10:55, Priya Ahuja <priahuja321@gmail.com
> > <javascript:;>> wrote:
> > >
> > > Hi,
> > >
> > > Any idea why I am seeing stackoverflow error? I am using log4j2 and
> > LOGFILE
> > > is my rolling file appender.
> > >
> > > Exception in thread
> > >
> >
> "pool-28-thread-2-workitem-HOST-cf95a544-c4b1-4084-861b-80e4ed4f4045-workitem-HOST-56de5b12-2d80-49c8-8b21-90433c89a2a1"
> > > java.lang.StackOverflowError
> > > Exception in thread
> > > "pool-37-thread-1-workitem-HOST-ba35b9e4-1c83-4a42-af8a-6902f2eed941"
> > > java.lang.StackOverflowError
> > > 2015-12-10 17:22:11,041 ERROR Recursive call to appender LOGFILE
> > > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > > Exception in thread
> > >
> >
> "pool-37-thread-2-workitem-HOST-5162cb6e-16bc-4754-a44b-1947e441a3b5-workitem-HOST-ff45f0c7-e25e-48f8-ba7c-199912c015ac"
> > > java.lang.StackOverflowError
> > > at
> > >
> >
> org.apache.logging.log4j.spi.AbstractLogger.isTraceEnabled(AbstractLogger.java:591)
> > >
> > >
> > > Thanks,
> > > Priya Ahuja
> >
>

Re: Recursive call to appender stackoverflow error

Posted by Remko Popma <re...@gmail.com>.
Did this resolve the problem?

On Friday, 11 December 2015, Remko Popma <re...@gmail.com> wrote:

> You may have both the log4j-to-slf4j adapter jar and the log4j-slf4j-impl
> jar on the classpath. They will route calls to each other. You need to
> remove one of them.
>
> Sent from my iPhone
>
> > On 2015/12/11, at 10:55, Priya Ahuja <priahuja321@gmail.com
> <javascript:;>> wrote:
> >
> > Hi,
> >
> > Any idea why I am seeing stackoverflow error? I am using log4j2 and
> LOGFILE
> > is my rolling file appender.
> >
> > Exception in thread
> >
> "pool-28-thread-2-workitem-HOST-cf95a544-c4b1-4084-861b-80e4ed4f4045-workitem-HOST-56de5b12-2d80-49c8-8b21-90433c89a2a1"
> > java.lang.StackOverflowError
> > Exception in thread
> > "pool-37-thread-1-workitem-HOST-ba35b9e4-1c83-4a42-af8a-6902f2eed941"
> > java.lang.StackOverflowError
> > 2015-12-10 17:22:11,041 ERROR Recursive call to appender LOGFILE
> > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> > Exception in thread
> >
> "pool-37-thread-2-workitem-HOST-5162cb6e-16bc-4754-a44b-1947e441a3b5-workitem-HOST-ff45f0c7-e25e-48f8-ba7c-199912c015ac"
> > java.lang.StackOverflowError
> > at
> >
> org.apache.logging.log4j.spi.AbstractLogger.isTraceEnabled(AbstractLogger.java:591)
> >
> >
> > Thanks,
> > Priya Ahuja
>

Re: Recursive call to appender stackoverflow error

Posted by Remko Popma <re...@gmail.com>.
You may have both the log4j-to-slf4j adapter jar and the log4j-slf4j-impl jar on the classpath. They will route calls to each other. You need to remove one of them. 

Sent from my iPhone

> On 2015/12/11, at 10:55, Priya Ahuja <pr...@gmail.com> wrote:
> 
> Hi,
> 
> Any idea why I am seeing stackoverflow error? I am using log4j2 and LOGFILE
> is my rolling file appender.
> 
> Exception in thread
> "pool-28-thread-2-workitem-HOST-cf95a544-c4b1-4084-861b-80e4ed4f4045-workitem-HOST-56de5b12-2d80-49c8-8b21-90433c89a2a1"
> java.lang.StackOverflowError
> Exception in thread
> "pool-37-thread-1-workitem-HOST-ba35b9e4-1c83-4a42-af8a-6902f2eed941"
> java.lang.StackOverflowError
> 2015-12-10 17:22:11,041 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> 2015-12-10 17:22:11,042 ERROR Recursive call to appender LOGFILE
> Exception in thread
> "pool-37-thread-2-workitem-HOST-5162cb6e-16bc-4754-a44b-1947e441a3b5-workitem-HOST-ff45f0c7-e25e-48f8-ba7c-199912c015ac"
> java.lang.StackOverflowError
> at
> org.apache.logging.log4j.spi.AbstractLogger.isTraceEnabled(AbstractLogger.java:591)
> 
> 
> Thanks,
> Priya Ahuja

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org