0 Replies Latest reply: Sep 22, 2013 8:32 AM by user3907180 RSS

    Unable to use setCurrentRowWithKeyValue on POJO Data Control. Framework throws java.lang.RuntimeException

    user3907180

      In JDeveloper 11.1.2.4.0, I am researching an use case to pass data between page 1 based on ADFBC Data Control to  page 2 based on POJO Data Control.

       

      I have built this use case on sample application provided on ADF Code Corner.

        037. How-to build pagination into ADF POJO Data Control

       

      Here are the steps to re-produce this issue.

       

      1. Sample application already provides POJO Data Control named "SessionFacade".

      2. Add new Project "ADFBCModel" to build the ADFBC Application Module

      3. BuildApplication Module using Employee table from hr schema in the ADFBCModel project

      4. Vist ViewLayer project and open adfc-config.xml (unbounded task flow)

      5. Add view activity adfbc-browse-employee from the component pallet

      6. Add another view activity pojo-edit-employee from then component pallet

      7. Add control flow case from adfbc-browse-employee to pojo-edit-employee named adfbc_to_pojo

      8. Double click adfbc-browse-employee view activity and create adfbc-browse-employees.jspx page

      9. Double click pojo-edit-employee view activity and create pojo-edit-employee.jspx page

      10. Drag Employees collection from ADFBC DataControl to adfbc-browse-employee.jspx as ADF Read-only Table.

      11. Select Enable Row Selection, Enable Sorting, Enable Filtering

      12. Drag allEmployees collection from SessionFacade POJO DataControl to pojo-edit-employee.jspx as ADF Form

      13. On adfbc-browse-employee.jspx page, Surround EmployeeId Cell with Command Link

      14. Change Action Property of the command link to adfbc_to_pojo

      15. From SessionFacade POJO DataControl drag setCurrentRowWithKeyValue operation to Command Link. This will open Edit Action Binding dialog.

      16. Paste #{row.EmployeeId} as a value for rowKey parameter

      17. Run adfbc-browse-employee.jspx page

      18. Click the employee id link

       

       

      Follow exception shows on the screen.

       

       

      Error 500--Internal Server Error

       

       

      java.lang.RuntimeException: java.lang.Exception: Failed to invoke method: oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.setCurrentRowWithKeyValue

        at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.invokeOperation(UpdatableBeanDataControl.java:465)

        at oracle.adf.model.adapter.bean.BeanDataControl.invokeOperation(BeanDataControl.java:211)

        at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:502)

        at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)

        at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)

        at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)

        at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)

        at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at com.sun.el.parser.AstValue.invoke(Unknown Source)

        at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)

        at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)

        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1545)

        at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)

        at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)

        at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)

        at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)

        at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)

        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)

        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)

        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:973)

        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)

        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)

        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)

        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)

        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)

        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)

        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)

        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)

        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)

        at java.security.AccessController.doPrivileged(Native Method)

        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)

        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)

        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)

        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)

        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)

        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)

        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

      Caused by: java.lang.Exception: Failed to invoke method: oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.setCurrentRowWithKeyValue

        at oracle.adfinternal.model.adapter.bean.BeanDCUtils.invokeMethod(BeanDCUtils.java:734)

        at oracle.adf.model.adapter.bean.BeanDCInvokeMethodHandler.invoke(BeanDCInvokeMethodHandler.java:100)

        at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.invokeOperation(UpdatableBeanDataControl.java:459)

        ... 62 more