ADFC-62004: Scope object serialization failed

I recently had the pleasure of deploying an Oracle BPM application to a brand new staging environment configured for high availability.  The application appeared to run smoothly but for an occasional exception. This stack trace seen in the logs is probably a familiar sight for many:

The Oracle documentation has a high availability guide that sheds some light in this matter.  As a quick guide, verify:

  •  All pageflowscope and viewscope managed beans must implement Serializable.
  • All pageflowscope and viewscope managed beans *should not* contain UI bindings.  This is explained very clearly in Frank’s blog. In essence, component bindings should live for a  http request (request scope or backingBean scope). Any state or data you need for a longer duration can be saved in a pageflowscope bean separately.

When a value within a managed bean in either view scope or page flow scope is modified, the application needs to notify Oracle ADF so that it can ensure the bean’s new value is replicated.

Without additional code, Oracle ADF will be unaware of this change and will not know that a new value needs to be replicated within the cluster. To inform Oracle ADF that an object in an ADF scope has been modified and that replication is needed, use the markScopeDirty() method. The markScopeDirty() method accepts only viewScope and pageFlowScope as parameters.

Jdeveloper integrated server will not spit these errors by default. The server has to be run with the following JVM parameter:
Note that this check is disabled by default to reduce runtime overhead. Do not use this after your testing is complete.

Some additional configuration to vertify:
1. adf-config.xml updates for high availability:

2. HTTP session state replication setting in weblogic.xml is setup

3. Oracle ADF is not configured by default for failover by default. Failover is supported only with the proper setting in the ADF Business Components configuration file (bc4j.xml):

Reference: Oracle High Availability Guide
Reference: ADF Code Corner