[jboss-as7-dev] Serialization, proxies issue & AS7-5496
Scott Marlow
smarlow at redhat.com
Wed Sep 26 15:42:53 EDT 2012
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
More information about the jboss-as7-dev
mailing list