5 Replies Latest reply: Feb 16, 2009 3:49 PM by Kiril Kirov RSS

    Unable to wrap into a FullTextSessionProxy

    Chaya Ramu Newbie
      Hi,

      We are getting the below exception after every database operation:

      19:47:25,187 WARN  [HibernatePersistenceProvider] Unable to wrap into a FullTextSessionProxy, regular SessionProxy returned
      java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.seam.persistence.HibernatePersistenceProvider.proxySession(HibernatePersistenceProvider.java:98)
              at org.jboss.seam.persistence.HibernatePersistenceProvider.proxyDelegate(HibernatePersistenceProvider.java:117)
              at org.jboss.seam.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:95)
              at org.jboss.seam.persistence.HibernatePersistenceProvider.getSession(HibernatePersistenceProvider.java:331)
      .
      .
      .
      .
      Caused by: java.lang.ClassCastException: org.jboss.seam.persistence.FullTextHibernateSessionProxy cannot be cast to org.hibernate.impl.SessionImpl
              at org.hibernate.search.impl.FullTextSessionImpl.<init>(FullTextSessionImpl.java:54)
              at org.hibernate.search.Search.createFullTextSession(Search.java:17)

      Could one of you please suggest what may be the mistake that we are doing?

      For your reference:

      1. We are using JBoss 4.2.2GA, jboss-seam-2.0.2.SP1.
      2. Here is the same code that we using to get the

              @In
              EntityManager entityManager;

              public List getApplication(long applicationsId){
                      String sql = " from Applications where id = :id";
                      Query query = entityManager.createQuery(sql).setParameter("id",applicationsId);
                      List application = query.getResultList();
                     
                      return application;
              }


              components.xml:

              <persistence:managed-persistence-context   name="entityManager" auto-create="true"
                            persistence-unit-jndi-name="java:/cameraEntityManagerFactory"/>                         

      Thank you,
      VinodRamu