[ https://issues.apache.org/jira/browse/LOG4J2-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15829700#comment-15829700 ]
Jonathan Bayle commented on LOG4J2-587: --------------------------------------- Stack trace: {noformat} [1.0-SNAPSHOT][2017-01-19 10:34:08,968][ERROR] Exception in thread "symmetric-engine-startup-0" java.lang.NoClassDefFoundError: org/apache/log4j/AppenderSkeleton (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,969][ERROR] at java.lang.ClassLoader.defineClass1(Native Method) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,969][ERROR] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,969][ERROR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,969][ERROR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,969][ERROR] at java.net.URLClassLoader.access$100(URLClassLoader.java:73) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:368) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:362) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.security.AccessController.doPrivileged(Native Method) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:361) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,970][ERROR] at org.jumpmind.symmetric.util.LogSummaryAppenderUtils.registerLogSummaryAppender(LogSummaryAppenderUtils.java:40) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.ClientSymmetricEngine.init(ClientSymmetricEngine.java:170) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.web.ServerSymmetricEngine.init(ServerSymmetricEngine.java:62) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.ClientSymmetricEngine.<init>(ClientSymmetricEngine.java:139) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.web.ServerSymmetricEngine.<init>(ServerSymmetricEngine.java:47) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.web.SymmetricEngineHolder.create(SymmetricEngineHolder.java:241) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(SymmetricEngineHolder.java:461) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.log4j.AppenderSkeleton (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,971][ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:381) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,972][ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,972][ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,972][ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) (SystemLogHandler.java:267 - symmetric-engine-startup-0) [1.0-SNAPSHOT][2017-01-19 10:34:08,972][ERROR] ... 19 more (SystemLogHandler.java:267 - symmetric-engine-startup-0) {noformat} > 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 > Labels: easyfix > > 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. > The log4j SLF4J bridge does in fact contain the appender skeleton: > http://www.slf4j.org/api/org/apache/log4j/package-summary.html > Consequently a not so ideal workaround is to just use > {{log4j-over-slf4j.jar}} which does contain the AppenderSkeleton. -- 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