关于Struts + Hibernate 的项目产生的非常异常
2013-10-09 10:04
253 查看
病体:
MyEclips 6.0.0 +TomCat6.0.14
症状:
出现类似下列异常
异常一:
java.lang.SecurityException:class"org.apache.commons.collections.CursorableLinkedList"'s signer information does not match signer information of other classes in the same package
异常二:
java.lang.SecurityException:class"org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
病发:
发于Struts + Hibernate 的项目时。单独 Struts1.2项目 和Hibernate3.1项目均正常,两者结合,则症状出现。
病理:
异常是说org.apache.commons.collections的数字签名和其他类的不匹配。注意上面举例的两个异常都是这个“collections”之下;
在Struts 1.2 的核心包里有一个commons-beanutils.jar 这个的版本是1.7.0,里面有commons.collections。而在Hibernate 3.1 的核心包也有一个commons-collections.jar(版本是2.1.1)。有网友说这叫“冲突”,个人认为说“不匹配”
更加合适。后面说明为什么说“不匹配”。
治疗:
将Struts 1.2 的核心包里有一个commons-beanutils.jar 换成commons-beanutils-1.6.0版本的包。(注意文件名改成与原来的相同)
说明:
1.由上面分析找到原来的Struts1.2核心jar包所在的位置变成了 关键,以本人所用环境为例,给出路径如下参考:C:\ProgramFiles\MyEclipse6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.cross.easystruts.eclipse_6.0.0.zmyeclipse60020070820\data\1.2\lib
2.用commons-beanutils-1.6.0版本替换 现有版本。(注意与原来名字相同)
3.“不匹配”的原因在于,在 原来这个commons-beanutils中的 “overview.html
”中 有如下说明文字:“The Bean-Collections optional distribution contains objects which apply these techniques to collections. They rely on commons-collections 3.0 (or higher). ”明确指出了 “他们要依赖commons-collection3.0或者更高版本,而Hibernate3.1所提供的2.1.1”不符合要求,所以出现了“不匹配”。
既然是“不匹配”问题,自然可以用 调整 不匹配双方的方法来解决,所谓“条条大路通罗马”,且举一例,仅供参考
MyEclips 6.0.0 +TomCat6.0.14
症状:
出现类似下列异常
异常一:
java.lang.SecurityException:class"org.apache.commons.collections.CursorableLinkedList"'s signer information does not match signer information of other classes in the same package
异常二:
java.lang.SecurityException:class"org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
病发:
发于Struts + Hibernate 的项目时。单独 Struts1.2项目 和Hibernate3.1项目均正常,两者结合,则症状出现。
病理:
异常是说org.apache.commons.collections的数字签名和其他类的不匹配。注意上面举例的两个异常都是这个“collections”之下;
在Struts 1.2 的核心包里有一个commons-beanutils.jar 这个的版本是1.7.0,里面有commons.collections。而在Hibernate 3.1 的核心包也有一个commons-collections.jar(版本是2.1.1)。有网友说这叫“冲突”,个人认为说“不匹配”
更加合适。后面说明为什么说“不匹配”。
治疗:
将Struts 1.2 的核心包里有一个commons-beanutils.jar 换成commons-beanutils-1.6.0版本的包。(注意文件名改成与原来的相同)
说明:
1.由上面分析找到原来的Struts1.2核心jar包所在的位置变成了 关键,以本人所用环境为例,给出路径如下参考:C:\ProgramFiles\MyEclipse6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.cross.easystruts.eclipse_6.0.0.zmyeclipse60020070820\data\1.2\lib
2.用commons-beanutils-1.6.0版本替换 现有版本。(注意与原来名字相同)
3.“不匹配”的原因在于,在 原来这个commons-beanutils中的 “overview.html
”中 有如下说明文字:“The Bean-Collections optional distribution contains objects which apply these techniques to collections. They rely on commons-collections 3.0 (or higher). ”明确指出了 “他们要依赖commons-collection3.0或者更高版本,而Hibernate3.1所提供的2.1.1”不符合要求,所以出现了“不匹配”。
既然是“不匹配”问题,自然可以用 调整 不匹配双方的方法来解决,所谓“条条大路通罗马”,且举一例,仅供参考
相关文章推荐
- 关于Struts + Hibernate 的项目产生的“非常异常”
- 关于低版本的hibernate查询产生非常多的sql问题
- 关于maven使用产生的异常之:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile
- Android studio 导入layoutlib.jar 关于项目引入核心库(core-library)异常的问题
- 批量产生ssh2项目中hibernate带注解的pojo类的快捷方法
- 关于idea SpringBoot项目中出现与数据库连接加载不到驱动类异常
- 2013年一二月份寒假SSH项目——Hibernate常见异常
- 关于android studio项目构建时产生各种问题的解决方法
- 关于Web项目出现懒加载异常的解决方案
- 关于异常: org.hibernate.HibernateException: No Session found for current thread
- Struts + Hibernate 的异常,class "org.apache.commons.collections.CursorableLinkedList"'s signer information does not match signer in
- 关于大型javaee项目下的空指针异常
- EJB项目出现“org.hibernate.LazyInitializationException: could not initialize proxy - no Session”异常解决
- Hibernate 项目启动加载很慢,不联网时启动不了,还报异常Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exc
- 关于Hibernate内存中集合排序的非常棘手的问题
- 关于SubSonic3.0插件使用SqlQuery或Select查询时产生的System.NullReferenceException异常修复
- 关于Hibernate的 Batch update returned unexpected row count from update异常
- ssh2项目中,使用HibernateDaoSupport异常:'sessionFactory' or 'hibernateTemplate' is required
- 关于导入项目到eclipse产生的奇葩问题
- Hibernate懒加载导致json数据对象传输异常的问题---(非常重要)