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

Johno Crawford commented on LOG4J2-1642:
----------------------------------------

For my reference.

java.lang.NoClassDefFoundError This exception indicates that the JVM looked in 
its internal class definition data structure for the definition of a class and 
did not find it. This is different than saying that it could not be loaded from 
the classpath. Usually this indicates that we previously attempted to load a 
class from the classpath, but it failed for some reason - now we're trying to 
use the class again (and thus need to load it, since it failed last time), but 
we're not even going to try to load it, because we failed loading it earlier 
(and reasonably suspect that we would fail again). The earlier failure could be 
a ClassNotFoundException or an ExceptionInInitializerError (indicating a 
failure in the static initialization block) or any number of other problems. 
The point is, a NoClassDefFoundError is not necessarily a classpath problem.

> DefaultShutdownCallbackRegistry throws NoClassDefFoundError
> -----------------------------------------------------------
>
>                 Key: LOG4J2-1642
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1642
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7
>         Environment: java version "1.8.0_60"
> Maven_3.2.2
>            Reporter: Johno Crawford
>
> When running the Maven goals for packaging my project an exception is thrown 
> when the JVM exits..
> {noformat}
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 01:36 min (Wall Clock)
> [INFO] Finished at: 2016-10-18T12:06:06+03:00
> [INFO] Final Memory: 48M/626M
> [INFO] 
> ------------------------------------------------------------------------
> Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: 
> org/apache/logging/log4j/message/ParameterizedMessage
>       at 
> org.apache.logging.log4j.message.ParameterizedNoReferenceMessageFactory.newMessage(ParameterizedNoReferenceMessageFactory.java:104)
>       at 
> org.apache.logging.log4j.message.AbstractMessageFactory.newMessage(AbstractMessageFactory.java:75)
>       at 
> org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2010)
>       at 
> org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1884)
>       at 
> org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:793)
>       at 
> org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry.run(DefaultShutdownCallbackRegistry.java:76)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.logging.log4j.message.ParameterizedMessage
>       at 
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
>       ... 7 more
> {noformat}



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