Hello! I am changing my Hibernate from version 4.3.8.Final to 5.2.3.Final. Now I am not able to fetch the Hibernate Session as it did before, like this:
(Session) manager.unwrap(Session.class);
Give Cast Error
:java.lang.ClassCastException: org.jboss.weldx.persistence.EntityManager$1993463486$Proxy$_$$_WeldClientProxy cannot be cast to org.hibernate.Session
Does anyone have any ideas? From what I saw in the documentation it looks like it should be the same way. link