Friday, October 30, 2015

ADF Controller cannot find metadata for activity

Recently faced this error when working on ADF task flow which has a method call

Stack Trace::
<Oct 30, 2015 3:45:36 PM PDT> <Notice> <Stdout> <BEA-000000> <<Oct 30, 2015 3:45:36 PM PDT> <Error> <oracle.adfinternal.controller.application.AdfcExceptionHandler> <ADFC-50016> <ADFc: While handling an exception the application's exception handler threw a new exception.
oracle.adf.controller.activity.ActivityLogicException: ADFC-02013: The ADF Controller cannot find metadata for activity '/WEB-INF/taskflows/ervice/service-flow.xml#service-flow@methodName'.
at oracle.adfinternal.controller.util.Utils.createAndLogActivityLogicException(Utils.java:230)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:1003)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:853)
at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:245) at oracle.adfinternal.controller.application.RemoteTaskFlowCallRequestHandler.invokeTaskFlowByUrl(RemoteTaskFlowCallRequestHandler.java:99) at oracle.adfinternal.controller.application.RemoteTaskFlowCallRequestHandler.doCreateView(RemoteTaskFlowCallRequestHandler.java:64)
at oracle.adfinternal.controller.application.BaseRequestHandlerImpl.createView(BaseRequestHandlerImpl.java:57)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:95) at oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler.createView(CustomViewHandler.java:137
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:831)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:422)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

Fix::
Found that the method outcome is empty. Given some value to method outcome and the above error is gone.

Thursday, June 4, 2015

Useful info for JUnit issues in ADF

Below are some useful find outs
1)  When running Junits we have to change the application db credentials to a local db.
2) Set the Run/Debug profile option of Test project to :: -Xms512m -Xmx1280m -XX:MaxPermSize=1024m  to avoid permGen memory/space issue.
3) To avoid security errors run the ant command :: ant -f build-analytics.xml secure-workspace from fusionapps/hcm directory.
4) Caused by: java.lang.ExceptionInInitializerError: null --> occurs when an uninitialized object is used.
5) java.lang.AssertionError: No row found to use in test --> Test data provided is wrong, correct it.
6) oracle.apps.common.applicationsTestFramework.service.view.AtfAbstractCrudVOTest.voRowImplHasAttributeMetadata(AtfAbstractCrudVOTest.java:174)
     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     View object is not found or vo instance is null, to run JUnit.
7) oracle.jbo.InvalidOwnerException: -->  VO's are wrongly added in AM data-model tab
8) oracle.security.jps.internal.idstore.xml.idm.IdmXmlIdentityStore persist
SEVERE: /filepath/src/META-INF/jazn-data.xml (Read-only file system)
java.io.FileNotFoundException: /filepath/src/META-INF/jazn-data.xml (Read-only file system)
Check out the jazn-data.xml and continue your work.

Sunday, May 10, 2015

ADF tips

To show results for af:querycomponent when page loads set the below property
autoExecute="true".