users@glassfish.java.net

ClassCastException when using JPA result

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Tue, 19 Aug 2008 22:33:45 -0400

I loading a JPA entity from my POJO DAO that uses @PersistenceContext
and @Transactional from Spring 2.5. The result that is returned has the
same name (ex: com.company.app.dao.SettingsEntity) but I get a class
cast exception when I try to cast from Object to the entity bean class
so that I can use it. I wrote more details here:

http://forum.springframework.org/showthread.php?t=58964

I'm wondering if this is a JPA issue, not Spring?


Thanks,
Ryan