Exception:
java.lang.ClassCastException: class com.sun.proxy.$Proxy113 cannot be cast to class org.hibernate.internal.SessionImpl (com.sun.proxy.$Proxy113 and org.hibernate.internal.SessionImpl are in unnamed module of loader 'app')
at org.javers.spring.jpa.JpaHibernateConnectionProvider.getConnection(JpaHibernateConnectionProvider.java:22)
Here
(SessionImpl)entityManager.unwrap(Session.class);
entityManager.unwrap(Session.class) now returns Proxy instead of SessionImpl instance, because of changes in HibernateJpaVendorAdapter: entityManagerInterface changed from HibernateEntityManager (deprecated) to Session.
Probable fix: (SessionImpl)entityManager.unwrap(SessionImpl.class);
Exception:
java.lang.ClassCastException: class com.sun.proxy.$Proxy113 cannot be cast to class org.hibernate.internal.SessionImpl (com.sun.proxy.$Proxy113 and org.hibernate.internal.SessionImpl are in unnamed module of loader 'app')
at org.javers.spring.jpa.JpaHibernateConnectionProvider.getConnection(JpaHibernateConnectionProvider.java:22)
Here
(SessionImpl)entityManager.unwrap(Session.class);entityManager.unwrap(Session.class)now returns Proxy instead of SessionImpl instance, because of changes in HibernateJpaVendorAdapter: entityManagerInterface changed from HibernateEntityManager (deprecated) to Session.Probable fix:
(SessionImpl)entityManager.unwrap(SessionImpl.class);