java.lang.ClassCastException: org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

java.lang.ClassCastException: org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder
at org.springframework.orm.hibernate5.HibernateTemplate.prepareQuery(HibernateTemplate.java:1154)
at org.springframework.orm.hibernate5.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1247)
at com.sun.proxy.$Proxy102.createQuery(Unknown Source)
at com.eedgesoft.dao.model.conf.jobs.feed.RSSJobFactory$1.doInHibernate(RSSJobFactory.java:37)
at com.eedgesoft.dao.model.conf.jobs.feed.RSSJobFactory$1.doInHibernate(RSSJobFactory.java:1)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:341)
at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:296)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.