javassist两个jar包导致:.Department_$$_javassist_1 cannot be cast to javassist.util.proxy.Proxy

当处理如下代码:

1
2
Javassist Enhancement failed: com.entities.Department
java.lang.ClassCastException: com.entities.Department_$$_javassist_1 cannot be cast to javassist.util.proxy.Proxy

 

1
2
3
<many-to-one name="department" class="com.entities.Department">
           <column name="DEPARTMENT_ID"/>
       </many-to-one>



当输出数据到页面时候出现如下错误:  

1
2
Javassist Enhancement failed: com.entities.Department
java.lang.ClassCastException: com.entities.Department_$$_javassist_1 cannot be cast to javassist.util.proxy.Proxy

原因是有两个javassis的jar包,一个是hibernate的,一个是struts2的...,把低版本的删掉即可!   




posted @ 2016-03-20 15:14  奔跑吧_兄弟!  阅读(6182)  评论(1编辑  收藏  举报