当Web层和Struts整合后,就抛出如下异常: %%%% Error Creating SessionFactory %%%% java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package 解决方案: 1)下载 MyEclipse 6.0.1 来开发; 2)或者去http://commons.apache.org/collections/ 下载一个新的包,把原来的commons-collections-xxx.jar给删了,然后用新的包替换。注意:一定要到应用的发布目录去做这个工作,而且替换后不能重新发布应用,然后立即重启Tomcat再测试。如果再报下面的错误: ERROR [org.hibernate.proxy.BasicLazyInitializer] - CGLIB Enhancement failed: dao.User 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即可 myeclipse 6.0.0下 struts整合hibernate直接使用时如果报重复collection包错误,只需要把commons-collections-xxx.jar删掉就可以.因为struts下commons-beanUtil -xxx.jar 已经包含了这个包,冲突了.
myeclipse struts hibernate 整合异常
最新推荐文章于 2025-04-14 11:15:00 发布