Serialization / deserialization is supposed to return the same CAS :-) (but see exception below).
The deserialization step *requires* that the CAS you deserialize into, is previously set up with the proper type system for the types in the serialized form. The *lenient* flag, if set, disables the error message you would normally get, if the serialized form has a type in it trying to be deserialized, but the CAS doesn't have that type defined. This allows you to deserialize just some subset of the types in the serialized form - namely those which are defined in the CAS's type system. ---------- Please check and confirm that you've set up the CAS you're deserializing into, with the type system containing all the types that may be in the serialized form. -Marshall On 6/15/2011 4:07 PM, Joel Dubbels wrote: > New user question about serialization. I would like to serialize my CAS > to disk and then later on, with a new program/invocation/whatever, I'd > like to deserialize the CAS and work with it. When I do just normal > serialization/deserialization I appear to be losing a lot of types from > the typesystem (provided I am doing lenient deserialization), which > results in a very empty CAS. I want exactly the same CAS as what I > serialized out.. It looked like I was able to successfully > serialize/deserialize when I used an XmiSerializationSharedData object > between serialize/deserialize. However, if I want to do the > deserialization in an different program/invocation/whatever from where I > did the serialization, how do I preserve the XmiSerializationSharedData > object that allows me to pick up all the types that I originally > serialized out. Ie. do I have to somehow preserve/serialize the > shareddata object (which seems silly and also not doable because it is not > a serializable object). I'm sure there must be a straightforward way to > do this. Anyone have an answer, or better yet, a good example? Thanks. > > Joel Dubbels > Watson Solution Development > Healthcare and Life Sciences Solution Development > Phone: 507-253-1165 > Internet:[email protected]
