Cannot find the TypeLoadExceptionHolder on the object that is being serialized

I am trying to serialize a large object, this has been working for months if not years, and a recent revision caused this error on old files.

When re-serializing, I get a message saying something is TypeLoadExceptionHolder

not marked as. ' Serializable

' I have set a breakpoint just before the serialization call and cannot find a reference to that type. Is there a way to "scan" the object I'm trying to serialize and see where the reference is to TypeLoadExceptionHolder

?

+3


source to share


1 answer


There are a number of scenarios that can trigger this type of exception. A few more common here and here .

(Summarizing the above links) In a nutshell, binary data serialization does not throw exceptions when the type cannot be serialized. Instead, it replaces unserializable with TypeLoadExceptionHolder. In addition to being not well documented, there is even less reason for using it.



You might be stuck with manually calculating what has changed in the object you are trying to serialize. Specifically, look for:

  • Changing the namespace.
  • Username change.
  • The data type of the participant is changed.
+3


source







All Articles