users@glassfish.java.net

Re: ClassCastException when using JPA result

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 19 Aug 2008 20:47:07 -0700

Ryan,

This is usually caused by weaving. If you have your entities weaved on the
server (e.g. to support LAZY loading), you need to have them weaved either
dynamically (ACC would do that) or statically (i.e. you'd need to
modify/repackage the client side jar) yourself.

Regards,
-marina

Ryan de Laplante wrote:
> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>