2 Replies Latest reply on Oct 5, 2012 12:07 PM by yunshi tan

    org.hibernate.internal.SessionImpl cannot be cast to org.hibernate.classic.Session

    Machara Rao P Newbie

      HI

       

      I am newly joined in this community! i am facing some issue when i try to use Hibernate Search in JBoss 7 i am getting following exception

       

       

      14:46:01,104 WARN  [org.hibernate.internal.SessionFactoryImpl] (http-localhost-127.0.0.1-8079-1) HHH000008: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()

      14:47:32,172 ERROR [stderr] (http-localhost-127.0.0.1-8079-2) java.lang.ClassCastException: org.hibernate.internal.SessionImpl cannot be cast to org.hibernate.classic.Session

       

      14:47:32,174 ERROR [stderr] (http-localhost-127.0.0.1-8079-2)     at org.hibernate.search.impl.FullTextSessionImpl.<init>(FullTextSessionImpl.java:105)

       

      14:47:32,174 ERROR [stderr] (http-localhost-127.0.0.1-8079-2)     at org.hibernate.search.Search.getFullTextSession(Search.java:45)

       

      14:47:32,175 ERROR [stderr] (http-localhost-127.0.0.1-8079-2)     at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.getFullTextSession(FullTextEntityManagerImpl.java:71)

       

      14:47:32,176 ERROR [stderr] (http-localhost-127.0.0.1-8079-2)     at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.createFullTextQuery(FullTextEntityManagerImpl.java:100)

       

      please help me solving this issue

       

      Thanks in advance

      Machara