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

Spring JIRA | Vadim Marchenko | 1 year ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder

      at org.springframework.orm.hibernate5.HibernateTemplate.prepareQuery()
    2. org.springframework.orm
      HibernateTemplate$CloseSuppressingInvocationHandler.invoke
      1. org.springframework.orm.hibernate5.HibernateTemplate.prepareQuery(HibernateTemplate.java:1154)[spring-orm-4.2.1.BUILD-SNAPSHOT.jar:4.2.1.BUILD-SNAPSHOT]
      2. org.springframework.orm.hibernate5.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1247)[spring-orm-4.2.1.BUILD-SNAPSHOT.jar:4.2.1.BUILD-SNAPSHOT]
      2 frames
    3. com.sun.proxy
      $Proxy102.createQuery
      1. com.sun.proxy.$Proxy102.createQuery(Unknown Source)[na:na]
      1 frame
    4. com.eedgesoft.dao
      RSSJobFactory$1.doInHibernate
      1. com.eedgesoft.dao.model.conf.jobs.feed.RSSJobFactory$1.doInHibernate(RSSJobFactory.java:37)[classes/:na]
      2. com.eedgesoft.dao.model.conf.jobs.feed.RSSJobFactory$1.doInHibernate(RSSJobFactory.java:1)[classes/:na]
      2 frames
    5. org.springframework.orm
      HibernateTemplate.execute
      1. org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:341)[spring-orm-4.2.1.BUILD-SNAPSHOT.jar:4.2.1.BUILD-SNAPSHOT]
      2. org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:296)[spring-orm-4.2.1.BUILD-SNAPSHOT.jar:4.2.1.BUILD-SNAPSHOT]
      2 frames