|
In our project with glassfish is failing the same issue. Hibernate takes different classloader that EAR deployer Classloader, so, the cast with the same class is failing.
We have entities and persistence.xml into the same EJB, and it's failing with named queryies: List<CBO> cboList = this.em.createNamedQuery("CBO.findByAvegoIDList").setParameter("avegoIDs", avegoIDs).getResultList(); try{ for (CBO cbo : cboList) { result.add(new CboDTO(cbo)); }
}catch(Exception e) { e.printStackTrace(); throw e; }
|