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

Seth Leger updated LOG4J2-832:
------------------------------
    Environment: Java 1.7u67 Linux/OSX/Win7, Java 1.7u60 Linux, Java 1.7u25 
Linux  (was: Java 1.7u60, Java 1.7u25)

I have figured out why the test is working for you and not me. The issue is 
fixed in the latest log4j 2.1-SNAPSHOT code. My POM file runs the test against 
log4j 2.0.2 which does fail.

I have not figured out exactly which change in log4j master fixed the issue. I 
am a little worried because the catch() statements haven't been changed in 
ThrowableProxy so I wonder if a class could still trigger an exception here 
somehow.

I'm not sure what to do now. You can mark the bug as fixed in 2.1 but anyone 
using log4j 2.0.x could still encounter this issue unless a fix is backported 
and released in a 2.0.3 release.

> ThrowableProxy fails if sun.reflect.misc.Trampoline is in logged stack trace
> ----------------------------------------------------------------------------
>
>                 Key: LOG4J2-832
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-832
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0, 2.0.2
>         Environment: Java 1.7u67 Linux/OSX/Win7, Java 1.7u60 Linux, Java 
> 1.7u25 Linux
>            Reporter: Seth Leger
>            Priority: Blocker
>         Attachments: LOG4J2-832.patch, Log4j2MethodUtilTrampolineTest.java, 
> Log4j2MethodUtilTrampolineTest.java, ggregory-log4j2.patch, pom.xml
>
>
> When the Logger attempts to log a message with an exception stack trace, it 
> uses the ThrowableProxy class to introspect classes in the stack trace frames.
> If the class sun.reflect.misc.Trampoline is in the stack trace, the 
> introspection performed by ThrowableProxy will fail causing a java.lang.Error 
> to be thrown by the Logger call.
> The sun.reflect.misc.Trampoline class is used by the 
> sun.reflect.misc.MethodUtil class to perform reflection-based method 
> invocations. MethodUtil is widely used by libraries to perform method 
> invocations. I've encountered this problem when invoking methods over JMX and 
> inside Jetty.
> I am classifying this as a blocker because it means that any logging 
> statement that is logging a Throwable message containing a MethodUtil-based 
> reflection stack trace can cause a java.lang.Error to be thrown by Log4j2. 
> I will attach a unit test for this failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to