myjavaBlog

工作越努力学到的越多。
posts - 4, comments - 7, trackbacks - 0, articles - 34
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下.



只有注册用户登录后才能发表评论。


网站导航: