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

    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.apache.commons.dbcp2.BasicDataSourceFactory.<clinit>(BasicDataSourceFactory.java:64)
    at cn.itheima.jdbc.utils.DBCPUtils.<clinit>(DBCPUtils.java:22)
    at cn.itheima.jdbc.test.TestDBCP.testUpdateUserById(TestDBCP.java:17)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    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)
    ... 26 more

    解决办法:

    去下载Apache Commons Logging

    右键项目->Properties->Java Build Path->Libraries->Add External JARs...->commons-logging-1.2.jar

  • 相关阅读:
    c# 时间戳转换为Datetime类型的时间
    WCF小白初试 错误之一:“有零个应用程序终结点”的解决办法
    对html制作新手的一些建议,大牛可以忽略
    Aspose.Words导出dt到word的问题
    获取checkboxlist选中的值以及绑定来自之前选中的来自数据库的值
    excel导入mssql数据库,支持excel2003--2010文件格式
    vscode调试angular
    asp.net web api 跨域问题
    WPF 完美截图 <二>
    EF错误
  • 原文地址:https://www.cnblogs.com/denggelin/p/7219152.html
Copyright © 2011-2022 走看看