I stumbled into the same problem.  ClassCastException with SerializableProxy 
being assigned to a lazily fetched OneToMany relationship in my entity bean.  
I'm not a hibernate code expert, but it seems to me since all my beans 
implement java.io.Serializable, and SerializableProxy also implements this, 
that there should not be a ClassCastException (unless there is some serious 
CGLib hacking going on).  I am using isolated classloading with the 
jbossall-client.jar to pull stateful session bean and execute a method that 
pulls an entity beans with OneToMany mappings.   Is this a problem with the 
EJB3 container? or with the client jars?


Caused by: java.lang.ClassCastException: cannot assign instance of 
org.hibernate.proxy.SerializableProxy to field com.ed.data.AdOrg.adClient of 
type com.ed.data.AdClient in instance of com.ed.data.AdOrg
        at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
        at 
org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProxy.java:133)
        at $Proxy1.getResultList(Unknown Source)
        at com.ed.tests.ClientTest.(ClientTest.java:43)
        at com.ed.tests.ClientTest.main(ClientTest.java:60)



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929145#3929145

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3929145


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to