[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    [jira] [Created] (LOG4J2-587) log4j-1.2-api emulation jar missing classes
From:       "Adam Gent (JIRA)" <jira () apache ! org>
Date:       2014-03-31 3:02:14
Message-ID: JIRA.12705580.1396234929408.34491.1396234934587 () arcas
[Download RAW message or body]

Adam Gent created LOG4J2-587:
--------------------------------

             Summary: log4j-1.2-api emulation jar missing classes
                 Key: LOG4J2-587
                 URL: https://issues.apache.org/jira/browse/LOG4J2-587
             Project: Log4j 2
          Issue Type: Bug
          Components: log4j 1.2 emulation
    Affects Versions: 2.0-rc1
            Reporter: Adam Gent


The log4j 1.2 emulation jar does not contain {{AppenderSkeleton}}. There are several \
Spring components like spring-amqp that define custom appenders. 

Even if you don't reference those appenders because of various class loading \
discovery (such as Springs annotation configuration) you will get exceptions like

{code}
java.lang.NoClassDefFoundError: org/apache/log4j/AppenderSkeleton
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
	at java.lang.Class.getDeclaredMethods(Class.java:1855)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(
 {code}

And thus you cannot remove the original log4j-1.2.x jars.

Basically the class just needs to exist to avoid reflection exceptions like the one \
above. Unfortunately this is a show stopper for us as we use Spring heavily and and \
it appears to happen on any of our spring applications and we don't allow jars with \
duplicate classes in our projets.

This appears to be an easy fix... just stub all of the log4j-1.2 classes that are \
extendable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic