javassist两个jar包导致:.Department_$$_javassist_1 cannot be cast to javassist.util.proxy.Proxy
Posted 奔跑吧_兄弟!
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的...,把低版本的删掉即可!
!--more-->
以上是关于javassist两个jar包导致:.Department_$$_javassist_1 cannot be cast to javassist.util.proxy.Proxy的主要内容,如果未能解决你的问题,请参考以下文章