SSH整合依賴包問題

 
SSH整合的依賴包衝突問題

   Spring所依賴的包,有時候會與其它框架所依賴的包造成衝突,引起系統一些摸不清楚的問題,最近就遇到了兩個這方面的問題。
1、spring與hibernate的衝突.兩個框架都依賴asm.jar包spring的版本是asm-2.23.jar.hibernate依賴的是asm.jar
需要將asm-2.2.3.jar刪除.沒有刪除的話會引起這樣的異常:

"org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
     Caused by:...
     

2、hibernate 與struts的衝突,兩個框架都依賴common-collections.jar.hibernate的是common-collections-2.1.1.jar,struts的是common-collections.jar.需要將hibernate所依賴的common- collections-2.1.1.jar刪除.沒有刪除的話會引起這個異常:

java.lang.SecurityException: class "org.apache.commons.collections.ArrayStack"'s signer information does not match signer information of other classes in the same package...
    



發佈了57 篇原創文章 · 獲贊 0 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章