Posted on 2008-11-25 17:25
java人生 阅读(226)
评论(0) 编辑 收藏 所属分类:
ssh
1、运行Tomcat时报错 java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
Spring 和 Hibernate 共用的一些 jar 文件发生了版本冲突, WEB-INF/lib/ 目录下删除asm-2.2.3.jar ,然后重启 Tomcat.
2、运行tomacat 报错 java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEBINF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
Caused by:
java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
原因:
找不到 Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
就Apache所提供的基本对象池。
解决:
到这里http://commons.apache.org/downloads/download_pool.cgi下载包,然后,把里面的commons-pool-x.jar复制到myEclipse的WEB-INF/lib下.