Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/BasePoolableObjectFactory

原创 2016年05月31日 10:12:24

摘要:异常信息解决过程记录


一:异常信息:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/BasePoolableObjectFactory
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.danga.MemCached.SockIOPool.getInstance(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
	... 31 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool.BasePoolableObjectFactory
	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 61 more


二:解决办法:

从上面的异常信息可以看出应该是少了commons.pool这个jar包了,只要在你的项目里面的pom.xml文件中引入该jar的依赖即可,如下:

<dependency>
			<groupId>commons-pool</groupId>
			<artifactId>commons-pool</artifactId>
			<version>1.6</version>
		</dependency>


版权声明:本文为博主原创文章,转载请加上原文链接,谢谢!

相关文章推荐

apache-common pool的使用

Apache commons-pool本质上是"对象池",即通过一定的规则来维护对象集合的容器;commos-pool在很多场景中,用来实现"连接池"/"任务worker池"等,大家常用的dbcp数据...

Memcached之执行报BasePoolableObjectFactory类找不到异常

Memcached程序测试报错异常: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/poo...
  • yhl_jxy
  • yhl_jxy
  • 2016年03月11日 00:23
  • 1012

NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory

java中用连接池出现错误NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory    在java中使用连接池技...

怎么解决java.lang.NoClassDefFoundError错误

前言在日常Java开发中,我们经常碰到java.lang.NoClassDefFoundError这样的错误,需要花费很多时间去找错误的原因,具体是哪个类不见了?类明明还在,为什么找不到?而且我们很容...

Caused by: java.lang.NoClassDefFoundError和 Caused by: java.lang.ClassNotFoundException: Didn't find

================================== 参考 http://blog.csdn.net/wanli_smile/article/details/7452847 ...

java.lang.NoClassDefFoundError问题

Java程序员经常被运行时的java.lang.NoClassDefFoundError搞得焦头烂额,产生这个问题的原因显然是Java的类加载器没有找到相关类的定义 这里就先举一个实际问题的...
  • xplizm
  • xplizm
  • 2012年11月08日 14:07
  • 4895

Maven项目报错:Caused by: java.lang.NoClassDefFoundError: com/fasterxml/classmate/Filter

一、问题描述 项目一运行就报错: Caused by: java.lang.NoClassDefFoundError: com/fasterxml/classmate/Filter at org...

nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

刚配置了一下redis环境,发现报了一个错:nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/im...

nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolC

今天搭项目碰到如下错误: SEVERE: Exception sending context initialized event to listener instance of clas...

java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool异常的解决办法

spring+hibernate框架的集成, 一启动Tomcat服务器就出了一大堆异常 报的错误是java.lang.NoClassDefFoundError: org/apache/common...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/BasePoolableObjectFactory
举报原因:
原因补充:

(最多只允许输入30个字)