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
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.*