标签:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:81) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.<init>(FactoryBeanRegistrySupport.java:43) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:176) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:159) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:170) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:166) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:78) at org.springframework.beans.factory.xml.XmlBeanFactory.<init>(XmlBeanFactory.java:67) at com.spring.test.Main.main(Main.java:16) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 9 more
解决:
把common-logging.jar包添加到buildpath
链接地址:common-logging.jar
密码:isll
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
标签:
原文地址:http://www.cnblogs.com/changyaoguo/p/5462390.html