江巅 2009-12-12
2007-12-07 发现用 MyEclipse 5.5 做 Struts 1.2 + Spring 2.0 + Hibernate 3.1 整合时启动过程中报如下的错误:
2007-12-0716:36:17,406ERROR[org.hibernate.proxy.BasicLazyInitializer]-CGLIBEnhancementfailed:dao.User
java.lang.NoSuchMethodError:org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
atnet.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
因为Spring和Hibernate共用的一些jar文件发生了版本冲突,删除WEB-INF/lib/asm-2.2.3.jar然后重启Tomcat.
公用jar文件:
asm-2.2.3.jar
asm.jar
asm-attrs.jar
asm-commons-2.2.3.jar
asm-util-2.2.3.jar