Tuesday, February 4, 2014

java.io.NotSerializableException in Oracle ADF


Why this error occurs?

This error occurs because of binding a UI Component to the managed bean which is not in Backing Bean or Request Scope. UI Component binding objects in scopes other than Backing Bean scope and request scope are expected to be serializable. 

How to resolve the issue?

Restrict the scope of the managed bean that you reference through a UI component's binding attribute to backingBean or request scope. Instances of UI components cannot be serialized. For this reason, you should not bind UI components to managed beans that have a scope other than Backing Bean scope or request scope. Note that JDeveloper defaults the binding attribute for UI components and region fragments to use the backingBean scope.

If the managed bean is in any other scope, then use the method findComponentInRoot method from this link 

No comments:

Post a Comment