Tuesday, February 23, 2016

Deploying ADF Fusion Web Application to StandAlone Weblogic Server


Common issues while deploying adf web application to standalone server in 12c.

Problem while deploying Oracle ADF application - java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter 
http://www.albinsblog.com/2012/08/problem-while-deploying-adf-application.html#.VsysTFKaIs1

Caused by: weblogic.common.ResourceException: DataSource XXX_XXXXX already exists

Caused by: java.lang.ClassNotFoundException: oracle.bc4j.mbean.BC4JConfigLifeCycleCallBack

Thursday, February 18, 2016

af:target throws NotSerializableException


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.
       
        org.apache.myfaces.trinidad.CLIENT_STATE_METHOD
        token
   


        org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE
        false
 
Oracle Reference : https://docs.oracle.com/cd/E26098_01/web.1112/e16181/ap_config.htm#ADFUI579 
OTN # https://community.oracle.com/message/13694299#13694299