You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Kenneth Gendron (JIRA)" <ji...@apache.org> on 2015/06/09 07:47:00 UTC
[jira] [Commented] (LOG4J2-1046) Circular Exception cause throws
StackOverflowError
[ https://issues.apache.org/jira/browse/LOG4J2-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578363#comment-14578363 ]
Kenneth Gendron commented on LOG4J2-1046:
-----------------------------------------
Thank you very much
> Circular Exception cause throws StackOverflowError
> --------------------------------------------------
>
> Key: LOG4J2-1046
> URL: https://issues.apache.org/jira/browse/LOG4J2-1046
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.1, 2.3
> Reporter: Kenneth Gendron
> Fix For: 2.4
>
>
> If an exception with a circular-referenced exception (suppressed, or otherwise) is logged, log4j will throw a StackOverflowError:
> {code:java}
> Exception e1 = new Exception();
> Exception e2 = new Exception(e1);
> e1.initCause(e2);
> LogManager.getLogger().error("Error", e1);
> {code}
> Will throw the following:
> {code:java}
> java.lang.StackOverflowError
> at java.util.Vector.elementData(Vector.java:730)
> at java.util.Vector.elementAt(Vector.java:473)
> at java.util.Stack.peek(Stack.java:103)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.toExtendedStackTrace(ThrowableProxy.java:555)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:147)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org