HHH000142 javassist enhancement failed cannot be cast to org.hibernate.proxy.hibernateproxy

I am using hibernate 5.0.9 on EAP7.

Using JPA .

getting HHH000142 javassist enhancement failed cannot be cast to org.hibernate.proxy.hibernateproxy

what could be reason ?

Try replicating it with this test case template.

Hi,
Just want to throw more light on the issue.
We are using JBOSS EAP7. Its BOM gets 4.2.24 Hibernate.
The hibernate in turn brings javassist 3.18.1.

we are continuously getting error of HHH000142 javassist enhancement failed org.hibernate.proxy.pojo.javassist.javassistproxyfactory.getproxy(javassistproxyfactory.java:130)

what could be issue ?

Hibernate 4.x is very old. You might want to try with a newer version of Hibernate and see if the problem was fixed in the meanwhile.

Actually we are working on a migration project from EAP 6 to EAP7.

the customer’s application users Hibernate 3.
when we migrate to EAP7, it has default packaging of Hibernate 4.2.24.

Moving directly to Hibernate 5 is not recommended as it will cause lot of changes in customer code.

thanks for your prompt revert !!

Even if you don’t migrate to Hibernate 5, it’s still better to address this issue to the JBoss or Wildfly forum.