zoukankan      html  css  js  c++  java
  • spring 错误 java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    引用:http://javapub.iteye.com/blog/1155840

    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) 
    ... 11 more 

    缺少 commons-logging.jar,也可以添加commons-logging-1.0.4.jar,建议使用后者或者更新版本。 
  • 相关阅读:
    fstat、stat和lstat 区别
    listen()函数中的SOMAXCONN含义
    #ifndef#define#endif的用法(整理)
    stdin和STDIN_FILENO的区别(转)
    S_ISREG等几个常见的宏
    *_t 数据类型
    IO模式精细讲解: MSG_DONTWAIT 、 MSG_WAITALL
    c标准函数库(查阅使用)
    stdint.h
    C# RichTextBox控件常用屬性和事件
  • 原文地址:https://www.cnblogs.com/sode/p/2693363.html
Copyright © 2011-2022 走看看