]
Adam Warski resolved HHH-4693.
------------------------------
Assignee: Adam Warski
Resolution: Fixed
Fix Version/s: 3.5
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
Assignee: Adam Warski
Priority: Minor
Fix For: 3.5
Attachments: testsrc.zip, 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: