[jboss-as7-dev] Serialization, proxies issue & AS7-5496

Stuart Douglas stuart.w.douglas at gmail.com
Wed Sep 26 19:07:14 EDT 2012


This seems odd, de.seimet.photo.entity.Location_$$_javassist_2 should 
write itself out as a SerializableProxy as well AFAIK.

Stuart

Scott Marlow wrote:
> I was able to reproduce the CNFE issue reported in AS7-5496 (using MySQL
> + the test case attached to the jira).
>
> The jira reports that the CNFE problem only occurs with Hibernate (using
> EclipseLink is a workaround).  I suspect that EclipseLink might not be
> using a proxy for the lazy association but not really sure.  According
> to the jira, this also used to work with AS5 (older Hibernate).
>
> During the first EJB client invocation, an entity is returned that
> contains a (lazy assocation) proxy that seems to be handled by a call to
> readResolve().  During the readResolve(), the original
> org.hibernate.proxy.pojo.javassist.SerializableProxy instance is
> replaced with a newly generated class
> de.seimet.photo.entity.Location_$$_javassist_2 instance.
>
> However, when the returned entity is passed to the other EJB client
> invocation (as a parameter), the generated class
> de.seimet.photo.entity.Location_$$_javassist_2, will not be known on the
> server side (causing the cnfe.)
>
> More details are in the jira.
>
> I'll try using the older version of Hibernate and see if that helps.
>
> Any other suggestions?
>
> Scott
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


More information about the jboss-as7-dev mailing list