[ 
https://issues.apache.org/jira/browse/LOG4J2-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482779#comment-14482779
 ] 

Remko Popma edited comment on LOG4J2-992 at 4/7/15 8:10 AM:
------------------------------------------------------------

Cem,

In the stack trace you provided I can see 
{{ExtendedThrowablePatternConverter.format}} triggers a call to 
{{ThrowableProxy.toExtendedStackTrace}}. This way of handling exceptions 
invokes special logic that does more than simply printing the stack trace: it 
loads classes and tries to find out which jar the class came from, and which 
line each method call occurred.

A quick workaround for you would be to configure the simpler exception handler 
%ex (or %exception or %throwable) in your pattern layout, instead of the 
_extended_ formatting triggered by %xEx (or %xException or %xThrowable). Can 
you try this and let us know if that helps?

So, in your configuration, replace all occurrences of 
%xEx|xException|xThrowable by %ex|exception|throwable.


was (Author: rem...@yahoo.com):
Cem,

In the stack trace you provided I can see 
{{ExtendedThrowablePatternConverter.format}} triggers a call to 
{{ThrowableProxy.toExtendedStackTrace}}. This way of handling exceptions 
invokes special logic that does more than simply printing the stack trace: it 
loads classes and tries to find out which jar the class came from, and which 
line each method call occurred.

A quick workaround for you would be to configure the simpler exception handler 
%ex (or %exception or %throwable) in your pattern layout, instead of the 
_extended_ formatting triggered by %xEx (or %xException or %xThrowable). Can 
you try this and let us know if that helps?

> ThrowableProxy throws NoClassDefFoundError (v2.2)
> -------------------------------------------------
>
>                 Key: LOG4J2-992
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-992
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>         Environment: IBM J9 VM
>            Reporter: CEM DAYANIK
>
> Might be considred as duplicate of LOG4J2-834.
> log4j2 classes tries to load classes which makes "static" blocks to run.
> Out pattern is the following:
> [%d] [%-5p] [%t] [%c] - %m%n
> How can we avoid this one for now?
> According to docs, there is not any info there related to "location info"?
> Isnt this supposed to happen at least when log4j2 tries to get information 
> about location info?



--
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