Similarly to CDV-244, we've found that HashMap (prior to JDK 1.6) serialization defeats TC instrumentation, which can lead to a serialized HashMap with unresolved references.
More specifically, the serialized HashMap can contain Terracotta ObjectID's rather than the expected values, leading to a ClassCastException. This is because the writeObject() method of HashMap (prior to JDK 1.6) calls private method entrySet0(), which we do not instrument, rather than public method entrySet(), which we do instrument.
We already have this bug reproduced in a system test and I am working on it.
(Tim found that this was apparently a bug that was fixed in JDK 1.6 - see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6280967
)
similar serialization bug, affecting Exam caching