Thursday, February 15, 2018

Exception: Scope object serialization failed (object not serializable)

A common reason for the "SEVERE: ADFc:Scope object serialization failed (object not serializable)" error message is that :
application developers reference JSF components in managed beans with a scope larger than request.

When using the JSF component Binding property to point to a managed bean, think backing bean and thus don't reference beans that are in scopes larger than request scope (so don't: use viewScope, pageFlowSope, sessionScope or applicationScope).
If, from a managed bean in a scope larger than request you need to have access to a component instance (though the other way around is a more common use case) then either
- look up the component on the UIViewRoot.

- resolve an EL reference to a managed bean in request scope that holds the component binding.

This article contains more details and other important subjects :
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/may2012-otn-harvest-1652358.pdf


No comments:

Post a Comment

java - fill distinct objects in ArrayList

If you have a list that contains some objects that it is considered as duplication when two or three fields of these objects are equal. How ...