logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CEM DAYANIK (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-992) ThrowableProxy throws NoClassDefFoundError (v2.2)
Date Tue, 07 Apr 2015 14:19:13 GMT

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

CEM DAYANIK commented on LOG4J2-992:
------------------------------------

If the changing pattern resolve the issue, it is ok for us.

For the other part, log4j2 shouldnt initialize any class in that manner. It doesnt just load
classes but make them "execute" which is really unexpected from a logger library. Also the
code only handles, classnotfound and linkage errors which is actually right, if it wouldnt
initialize the classes, but making class codes executes could throw all kind of exceptions,
even throwables. I guess you could handle those but it is just not right imo.

This could also cause all kind of leaks, since log4j2 classes are loaded into another classloader(parent)
in our case (but any logging library should be loaded in top-most classloader anyway) 

Loading only bytecodes is really another thing from executing them guys.

Hope you consider my suggestion or come up with another solution.

Thank you for really quick responses and your assistance.








> 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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message