Sometimes, when people use complete client-side state saving, or they passivate the HttpSession, they get a NotSerializableException thrown while Serializing the component state tree.
Usually the cause is user error - the user did not use a ValueBinding to bind to some unSerializable object. It is really hard to debug this type of exception because it occurs too late in the process and it is difficult to know which component generated the state that is not failing Serialization. I would like to propose that in UIXComponentBase.processSaveState we check for the log level of FINEST and if so, then we get call Object state = saveState(..); and immediately try to Serialize that state. If Serialization fails then we can log a nice report saying exactly which component has the bad state and it will be much easier for the user to track the problem down. We can also add code to org\apache\myfaces\trinidadinternal\renderkit\core\CoreResponseStateManager encodeSerializedViewAsString to catch the NotSerializableException and tell the user which log class and log level to enable to debug this. That way the user would not have to ask support. what do you think?
