java.lang.NoClassDefFoundError

org/apache/commons/logging/LogFactory

Samebug tips9

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.


rafaelrafael

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.core.CollectionFactory.<clinit>(CollectionFactory.java:64) at org.springframework.core.SimpleAliasRegistry.<init>(SimpleAliasRegistry.java:41) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:73) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:41) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:146) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:144) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:155) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:121) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:72) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:61) at spring.test.SpringTest.main(SpringTest.java:12) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 11 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Andreas HäberAndreas Häber
2 times, last one
johnxflyjohnxfly
2 times, last one
Unknown visitor
Unknown visitorOnce,
andyglickandyglick
Once,
somasundaramsomasundaram
Once,
2363 more bugmates