NoClassDefFoundError:....KeyedObjectPoolFactory

java配置JDBC时,用连接池出现错误NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory

at JDBCtools.JDBCUtils.<clinit>(JDBCUtils.java:13)

at JDBCtools.Test.main(Test.java:7)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool.KeyedObjectPoolFactory

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

... 2 more

解决方法:分析上面的错误,是缺少相应的类文件:需要下载并添加一个叫common-pool的jar包。

时间: 2024-12-23 20:16:38

NoClassDefFoundError:....KeyedObjectPoolFactory的相关文章

Spring boot ---- java.lang.NoClassDefFoundError: javax/servlet/ServletContext

场景描述 项目中用到spring boot进行带页面的开发,从github上的simples中下载了对应的spring-boot-sample-web-jsp项目,经简单修改之后死活启动不起来,各种异常.spring-boot以简单容易上手为核心宗旨,可为什么在引入jar时就会出现这么多问题呢? 异常信息 异常一: 2016-06-17 11:04:14.216 ERROR 4684 --- [ main] o.s.boot.SpringApplication : Application sta

java.lang.NoClassDefFoundError: com/opensymphony/x

问题:严重: Unable to read class [com.spml.action.AddUserAction]java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/DefaultClassFinder$InfoBuildingVisitor    at com.opensymphony.xwork2.util.finder.DefaultClassFinder.readClassDef(DefaultCla

Atitit.故障排除系列---NoClassDefFoundError NoClassDefFoundError

Atitit.故障排除系列---NoClassDefFoundError  NoClassDefFoundError java.lang.ClassNotFoundException找不到类异常.当应用试图根据字符串形式的类名构造类,而在遍历CLASSPAH之后找不到对应名称的class文件时,抛出该异常. 还有个NoClassDefFoundError,,是classload 新不上class加载.. 查看class是存在的... 作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:[

Java中使用json时java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher问题解决

下面代码: public static void main(String[] args) { JSONObject obj = new JSONObject(); obj.put("msg", "HELLO"); obj.put("path", "/pages/back/emp.jsp"); System.out.println(obj); } 如果遇到java.lang.NoClassDefFoundError: net/s

Java_异常_02_java.lang.NoClassDefFoundError: org/apache/log4j/Level

总结:解析Json时,除了要导入json-lib-2.2-jdk15.jar外,还要导入: commons-beanutils.jar, commons-httpclient.jar, commons-lang.jar, ezmorph.jar, morph-1.0.1.jar 1.异常1信息: Failed to instantiate SLF4J LoggerFactory Reported exception: java.lang.NoClassDefFoundError: org/apa

Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

MyEclipse运行的时候报错,菜鸟不理解是什么意思,最后找了一些资料才知道是因为缺少commons-logging.jar包 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66) at c

bug_ _小心android-support-v4.jar版本混乱造成的NoClassDefFoundError

当你的项目出现以下红色提示的时候,要小心了, 因为很可能因为这个错误而导致解释不通的异常出现. Found 2 versions of android-support-v4.jar in the dependency list,but not all the versions are identical (check is based on SHA-1 only at this time). 这个错误是因为导入的某个jar包版本跟第三方库的jar版本不一致造成的. 最常见的是android-su

java.lang.NoClassDefFoundError 怎么解决

java.lang.NoClassDefFoundError:找不到相应的类文件,当编译源文件以后都会生成一些类文件:***.class,执行时要用java(main所在的类) ,如果找不到相应的类,执行就会出现NoClassDefFoundError的异常.1.首先请确认没有错敲成java xxx.class,2.其次,检查CLASSPATH环境变量,3.将java文件按包名存放:比如工作目录是/work,类是package1.class1,那么将它存放为/work/package1/clas

java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/QueuedThreadPool$1

1.错误描述 [WARNING] FAILED qtp1691065417{8<=8<=8/254,0}: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/QueuedThreadPool$1 [WARNING] FAILED [email protected]: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/QueuedThreadPool