[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4693) MapProxy - problems during marshalling/demarchalling

Lawrence McAlpin (JIRA) noreply at atlassian.com
Mon Dec 14 19:23:08 EST 2009


MapProxy - problems during marshalling/demarchalling
----------------------------------------------------

                 Key: HHH-4693
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4693
             Project: Hibernate Core
          Issue Type: Bug
          Components: envers
    Affects Versions: 3.5.0-Beta-2
         Environment: envers version: 1.2.1-hibernate-3.3, 3.5.0-Beta-2
hsqldb, sybase
            Reporter: Lawrence McAlpin
            Priority: Minor
         Attachments: testsrc.zip, transient.patch

This is related to an issue resolved in HHH-4488.  

When attempting to serialize an @audited entity that contains a Map, we get the following exception:

Caused by: java.io.NotSerializableException: org.hibernate.envers.entities.mapper.relation.lazy.initializor.MapCollectionInitializor
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)

In the patch submitted with HHH-4488, the collection initializer for a CollectionProxy was made transient.  However, MapProxy and SortedMapProxy do not extend from CollectionProxy and have their own collection initializer field.  My patch simply marks it transient in those classes as well.

-- 
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