[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3309) Serialize/Deserialize problem in AbstractLazyInitializer with entitymode.MAP.

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Jul 8 19:20:12 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30606 ] 

Steve Ebersole commented on HHH-3309:
-------------------------------------

This is trying to fix a symptom.  The underlying issue is that AbstractLazyInitializer includes code to replace itself in the serial stream during serialization (using the standard serialization writeReplace approach).  For whatever reason, it would appear that writeReplace is not being called on Proxies (just in EntityMode.MAP entity-maps???) when run on JDK6.

So something changed wrt to serialization on JDK6.  We'll have to investigate what.

This fix is simply allowing the serialized initializer to be deserialized; however, as outlined above, it should never have been serialized in the first place.

> Serialize/Deserialize problem in AbstractLazyInitializer with entitymode.MAP.
> -----------------------------------------------------------------------------
>
>                 Key: HHH-3309
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3309
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: metamodel
>    Affects Versions: 3.2.6
>         Environment: Hibernate 3.2.6.ga, MySQL 5.0.45-community-nt, Spring MVC 2, Eclipse 3.3.1.1, JDK 1.6.0_03
>            Reporter: Lucas Baamonde
>
> I am work with entitymode.MAP and Spring Web Flow. When SWF trying to serialize the Map Class, then you would get a java.io.InvalidClassException: no valid constructor. I created a no argument constructor 	AbstractLazyInitializer(), then i build hibernate with JDK 1.5 and this work fine for me in JDK 1.6.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list