JDEV 12.2.1.0
I
am seeing below exception when I started using af:target tag in one of
my projects. Surprisingly one project works good and other fails with
below exceptions.
javax.faces.FacesException: oracle.adf.view.rich.event.Target
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1237)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeRenderResponse(LifecycleImpl.java:1040)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:332)
Caused By: java.io.NotSerializableException: oracle.adf.view.rich.event.Target
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.ArrayList.writeObject(ArrayList.java:762)
at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
I did googled around and found the below blog, but turning on/off, removing the parameter also did not help.
https://mhjmaas.wordpress.com/2014/12/17/adf-12c-target-tag-not-working-zip_state_failed/
As I mentioned in the my post,
Project 1 (ADF Application) - ADF Project is working fine as there is nothing in web.xml which is asking af:target to serialize.
Project
2 (BPM Appliclation with ADF Screens embedded) - But the same screen
(adf library jar) when embedded in BPM UI (which has human tasks)
Project is throwing NotSerializable exception.
Finally after making the below changes in BPM Project, af:target works good without exceptions.
"all": stores all state in the client in a
(potentially large) hidden form field. This matches the default behavior
of the JSF reference implementation, and can be useful for developers
avoiding any use of HttpSession.
"token":
(Default) Stores the page state in the session, but persists a token to
the client. The simple token, which identifies a block of state stored
back on the HttpSession object, is stored on the client. This enables
ADF Faces to disambiguate the same page appearing multiple times.
Failover is supported.