• Java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 解决方案


    Spring3.1启动时报错: 
    Exception in thread "main" 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) 

    解决方案:缺少 commons-logging.jar,也可以添加commons-logging-1.0.4.jar,建议使用后者或者更新版本。

  • 相关阅读:
    Java 线程:(一)
    RK:Webview、Chrome
    CocosCreator 加载Bundle里的Prefab
    Canvas 绘画
    CocosCreator 要用3D节点实现skewX
    Unity 动态创建网格
    凹多边形三角剖分
    UnityHub 登录失败
    浮点数
    八皇后问题(回溯算法)
  • 原文地址:https://www.cnblogs.com/hunttown/p/5450802.html
Copyright © 2020-2023  润新知