CDV ❯ SerializationUtils (ObjectOutputStream) doesn't resolve objects
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Duplicate
-
-
-
drb
-
Reporter: tgautier
-
April 19, 2008
-
0
-
Watchers: 0
-
August 07, 2009
-
April 22, 2008
Attachments
Description
See attached test. To repro untar:
$ mvn tc:start $ mvn tc:run $ mvn tc:run
The second run will attempt to read the object (a hand coded linked list 5 elements long) and clone it. It will print the read object, and the cloned object. Here are the results:
[INFO] [node] org.terracotta.sample.Main$Linked@5e32f9 : org.terracotta.sample.Main$Linked@5e32f9 : org.terracotta.sample.Main$Linked@5e32f9 : org.terracotta.sample.Main$Linked@5e32f9 : org.terracotta.sample.Main$Linked@5e32f9 : org.terracotta.sample.Main$Linked@5e32f9 [INFO] [node] org.terracotta.sample.Main$Linked@55c37d
The second output should have been 5 elements long like the first.
Comments
Taylor Gautier 2008-04-19
Scott Bale 2008-04-21
I notice that the example works correctly if you System.out.println the object BEFORE cloning it. I’m guessing there’s a problem in serializing a clustered object before it is faulted into the L1 node.
Also, there’s a minor bug in the print() method - you want to do buffer.append(current) rather than buffer.append(this).
Fiona OShea 2008-04-22
Closing as dup see linked issue which is assigned now to Scott. 2.6.1 target
http://forums.terracotta.org/forums/posts/list/0/987.page