Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1950

ClassCastException when using Hibernates DetachedCriteria

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.0.0.BETA1, 2.0.0.CR1
    • Fix Version/s: 2.0.0.CR2
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Jboss 4.2.1

      Description

      Since migration to Seam 2 (tried Beta 1 and CR1) I cannot list my entities using Hibernate's DetachedCriteria any longer. Stack trace is:

      Caused by: java.lang.ClassCastException: org.hibernate.search.impl.FullTextSessionImpl
      at org.jboss.seam.persistence.HibernateSessionProxy.getDelegateSessionImplementor(HibernateSessionP
      roxy.java:401)
      at org.jboss.seam.persistence.HibernateSessionProxy.list(HibernateSessionProxy.java:566)
      at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
      at de.dvdb.generic.search.AbstractSearch.retrieveItems(AbstractSearch.java:261)

      • in general I can access the entityManager in my application
      • I don't use Seam's new search capabilities at all (right now)
      • I'm getting the Hibernate Session in the following way:

      <factory name="hibernateSession" scope="STATELESS"
      auto-create="true" value="#

      {dvdb.delegate}

      " />

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

      Adding hibernate-search.jar and dependencies didn't help.

      • Chris

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                epbernard Emmanuel Bernard
                Reporter:
                chris1 Christian Pietsch
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: