Hibernate exception _$$_javassist_0 cannot be cast to javassist.util.proxy.Proxy

前端 未结 14 1340
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 09:33

Hello I am using developnig java web application and I am getting the next exception when I am trying to fetch data using hibernate

java.lang.ClassCastExcept         


        
14条回答
  •  死守一世寂寞
    2020-12-05 10:22

    If you are deploying your hibernate based application on the weblogic server or similar, you are going to have an earlier version of javassist jar available inside the modules folder of the server. This would cause the conflict talked about in the earlier answers where you may end up in having more than one jars in the classpath.

    specifically for weblogic add following in your weblogic-application.xml

    add package-name javaassist.* to ensure that latest is picked up.

    
    
    
       
          false
          
       
    
       
          antlr.*
          org.apache.commons.*
          org.apache.xmlbeans.*
          org.springframework.*
          org.hibernate.*
          org.joda.*
          javax.persistence.*
          com.google.*
          com.ibm.icu.*
          org.apache.axiom.*
          javassist.*
       
    
    

提交回复
热议问题