0 Replies Latest reply on Dec 14, 2015 6:28 AM by David Firth

    Problems with HibernateProxy Class Cast Exceptions

    David Firth Newbie



      I have been working with JBoss Fuse for a little while now, and I have been noticing some very strange behaviours... for some reason when I try and make a call to my Oracle database with Hibernate I sometimes get the following error:


      Caused by: java.lang.ClassCastException: com.example.my.dbmodel_$$_jvstcec_2 cannot be cast to org.hibernate.proxy.HibernateProxy

        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:140)


      What is it that causes this issue, as it doesn't happen every time I deploy to Fuse but it's becoming more and more frequent and blocks me from progressing?


      Kind Regards