3 Replies Latest reply on Feb 12, 2009 1:51 PM by jeff gardner

    DetachedCriteria exception

    jeff gardner Newbie

      Hi I am trying to execute a query using a DetachedCriteria. so I have

      @PersistenceContext(unitName = "contentDS") private Session session;

      when I do Criteria crit = crit1.getExecutableCriteria(session); I get

      javax.ejb.EJBException: java.lang.ClassCastException: org.jboss.ejb3.entity.TransactionScopedHibernateSession

      How can I fix this problem?