1 2 Previous Next 15 Replies Latest reply on Sep 16, 2009 7:13 AM by RLChristenson

    Getting error when trying to execute VO query.

    RLChristenson
      Hi all,

      I have a page that I'm launching with a personalization button. Here's the Destination URI for that button:


      OA.jsp?page=/lanl/oracle/apps/icx/por/req/webui/LANLSupplDocs838cPG&REQ_ID={@REQUISITION_HEADER_ID}


      below is my processRequest from the controller for this page, as well the AMImpl that is being called (createDoc).

      I'm getting the generic OAF "Error Page" with nothing anywhere to tell what caused the crash. But I've managed to narrow it down to the createDoc call.

      What am I doing wrong here?


      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
      {
      super.processRequest(pageContext, webBean);
      OAApplicationModule am = pageContext.getApplicationModule(webBean);
      OAViewObject vo = (OAViewObject)am.findViewObject("LANL838cVO1");

      // If isBackNavigationFired = false, we're here after a valid navigation
      // (the user selected the Supplemental Docs button) and we should proceed
      // normally and initialize a new doc.

      if (!pageContext.isBackNavigationFired(false))
      {
      // We indicate that we are starting the create transaction (this
      // is used to ensure correct Back button behavior).

      TransactionUnitHelper.startTransactionUnit(pageContext, "docCreate838c");

      // This test ensures that we don't try to create a new doc if
      // we had a JVM failover, or if a recyled application module
      // is activated after passivation. If these things happen, BC4J will
      // be able to find the row that you created so the user can resume
      // work.

      if (!pageContext.isFormSubmission())
      {
      am.invokeMethod("createDoc", null);

      // set this value for subsequent form buttons pressed
      OAViewObject paramVO = (OAViewObject)am.findViewObject("LANL838cPVO1");
      Row paramRow = (Row)paramVO.first();

      String stringReqHeaderId = pageContext.getParameter("REQ_ID");
      Number defaultReqHeaderId = null;

      try
      {
      defaultReqHeaderId = new Number(stringReqHeaderId);
      }
      catch(Exception e)
      {
      throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
      }

      vo.setWhereClauseParams(null);
      vo.setWhereClauseParam(0,defaultReqHeaderId);
      vo.executeQuery();

      if (vo.getFetchedRowCount() == 0)
      {
      vo.insertRow(vo.createRow());
      Row voRow = (Row)vo.first();
      voRow.setAttribute("ReqHeaderId",defaultReqHeaderId);
      }
      }
      else
      {
      if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "docCreate838c", true))
      {
      // We got here through some use of the browser "Back" button, so we
      // want to display a stale data error and disallow access to the page.
      // If this were a real application, we would probably display a more
      // context-specific message telling the user she can't use the browser
      // "Back" button and the "Create" page. Instead, we wanted to illustrate
      // how to display the Applications standard NAVIGATION ERROR message.

      OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
      pageContext.redirectToDialogPage(dialogPage);
      }

      }
      }
      }





      public void createDoc()
      {
      OAViewObject vo = (OAViewObject)getLANL838cVO1();


      // Per the coding standards, this is the proper way to initialize a
      // VO that is used for both inserts and queries. See View Objects
      // in Detail in the Developer's Guide for additional information.

      if (!vo.isPreparedForExecution())
      {
      vo.executeQuery();
      }

      Row row = vo.createRow();
      vo.insertRow(row);
      // Required per OA Framework Model Coding Standard M69
      row.setNewRowState(Row.STATUS_INITIALIZED);
      } // end createDoc()

      Edited by: RLChristenson on Sep 4, 2009 1:32 PM
        • 1. Re: Getting error when trying to execute VO query.
          Abdul Wahid
          Hi,
          Don't know the exact reason but few points to notice in the code.
          1.
          if (!vo.isPreparedForExecution())
          {
          vo.executeQuery();
          }
          Above code tries to execute vo when its not ready for execution. Why this is so? I think negation "!" should be removed from condition. That seems the root of issue.

          Moreover, if above is not cause, just a precation in line..
          OAViewObject vo = (OAViewObject)getLANL838cVO1()

          Please verify that in above case getLANL838cVO1() doesn't return null. (Probably a far possibility).

          Abdul Wahid
          • 2. Re: Getting error when trying to execute VO query.
            RLChristenson
            Abdul,

            That code is straight out of the tutorial. The comments even state that it is the correct way to initialize a VO or insert/update.
            • 3. Re: Getting error when trying to execute VO query.
              Abdul Wahid
              Does log contain some information?

              Abdul Wahid
              • 4. Re: Getting error when trying to execute VO query.
                719970
                Can you paste the error stack here
                • 5. Re: Getting error when trying to execute VO query.
                  Gauravv
                  Hi,

                  instead of

                  am.invokeMethod("createDoc", null);

                  use

                  am.invokeMethod("createDoc");

                  Thanks,
                  Gaurav
                  • 6. Re: Getting error when trying to execute VO query.
                    Reetesh Sharma
                    Hi,

                    Try as gaurav suggested and if possible tell us something about the error, what error you are gettinng, so that we can guess possible reasons for error.

                    Regards,
                    Reetesh Sharma
                    • 7. Re: Getting error when trying to execute VO query.
                      RLChristenson
                      I took the null out of my createDoc call and nothing changed on screen. Where should I be seeing this log info?

                      I went searching and found relevant data in this log:

                      $LOGSHOME/Jserv/<node>/jvm



                      I saw this:


                      [Sep 8, 2009 2:56:20 PM GMT]:1252421780237:Thread[Thread-773,10,main]:-1:-1:rd15.lanl.gov:128.165.157.64:8107:16070:UNEXPECTED:[fnd.framework.OAException]:Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT XxxlReq838c.REQ_838C_ID,
                      XxxlReq838c.CREATION_DATE,
                      XxxlReq838c.CREATED_BY,
                      XxxlReq838c.LAST_UPDATE_DATE,
                      XxxlReq838c.LAST_UPDATED_BY,
                      XxxlReq838c.REQ_HEADER_ID,
                      XxxlReq838c.FIELD1,
                      XxxlReq838c.FIELD2,
                      XxxlReq838c.FIELD3,
                      XxxlReq838c.FIELD4,
                      XxxlReq838c.LAST_UPDATE_LOGIN
                      FROM XXXL.XXXL_REQ_838C XxxlReq838c
                      WHERE req_header_id = :1;


                      If I click the back button and try again to launch my page, it can navigate there without error. Here's the most recent copy of my processRequest. I've made a couple small changes:


                      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                      {
                      super.processRequest(pageContext, webBean);

                      // If isBackNavigationFired = false, we're here after a valid navigation
                      // (the user selected the Supplemental Docs button) and we should proceed
                      // normally and initialize a new doc.

                      if (!pageContext.isBackNavigationFired(false))
                      {
                      // We indicate that we are starting the create transaction (this
                      // is used to ensure correct Back button behavior).

                      TransactionUnitHelper.startTransactionUnit(pageContext, "docCreate838c");

                      // This test ensures that we don't try to create a new doc if
                      // we had a JVM failover, or if a recyled application module
                      // is activated after passivation. If these things happen, BC4J will
                      // be able to find the row that you created so the user can resume
                      // work.

                      if (!pageContext.isFormSubmission())
                      {
                      OAApplicationModule am = pageContext.getApplicationModule(webBean);
                      am.invokeMethod("createDoc");

                      // set this value for subsequent form buttons pressed

                      OAViewObject vo = (OAViewObject)am.findViewObject("LANL838cVO1");
                      OAViewObject paramVO = (OAViewObject)am.findViewObject("LANL838cPVO1");
                      Row paramRow = (Row)paramVO.first();

                      String stringReqHeaderId = pageContext.getParameter("REQ_ID");
                      //(String)row.getAttribute("lReqID");
                      Number defaultReqHeaderId = null;

                      try
                      {
                      defaultReqHeaderId = new Number(stringReqHeaderId);
                      }
                      catch(Exception e)
                      {
                      throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
                      }

                      vo.setWhereClauseParams(null);
                      vo.setWhereClauseParam(0,defaultReqHeaderId);
                      vo.executeQuery();

                      if (vo.getFetchedRowCount() == 0)
                      {
                      vo.insertRow(vo.createRow());
                      Row voRow = (Row)vo.first();
                      voRow.setAttribute("ReqHeaderId",defaultReqHeaderId);
                      }
                      }
                      else
                      {
                      if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "docCreate838c", true))
                      {
                      // We got here through some use of the browser "Back" button, so we
                      // want to display a stale data error and disallow access to the page.
                      // If this were a real application, we would probably display a more
                      // context-specific message telling the user she can't use the browser
                      // "Back" button and the "Create" page. Instead, we wanted to illustrate
                      // how to display the Applications standard NAVIGATION ERROR message.

                      OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
                      pageContext.redirectToDialogPage(dialogPage);
                      }

                      }
                      }
                      }
                      • 8. Re: Getting error when trying to execute VO query.
                        Reetesh Sharma
                        Hi,

                        Please set these two profile options if not yet set, FND:Developer Mode / FND_DEVELOPER_MODE to Yes FND: Diagnostics / FND_DIAGNOSTICS to Yes.

                        After this if your page will error it will show you one link to see error details, from there you can compelete error stack on the page itself.

                        As error message suggest that some problem is there in your sql statement, but your code seems to be OK. Only chances are that your parameter couldn't be bind properly.

                        Please provide complete error stack.

                        Regards,
                        Reetesh Sharma
                        • 9. Re: Getting error when trying to execute VO query.
                          RLChristenson
                          OK, I've narrowed the error down to this line below: row.setAttribute("lReqID",stringReqHeaderId);

                          As you can see, I isolated this by throwing an error if stringReqHeaderId is null. I still see the NullPointerException. If this variable isn't null, and the transient attribute definitely exists in my summaryVO (LANL838cPVO1). So why the error?

                          Thanks!




                          public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                          {
                          super.processRequest(pageContext, webBean);

                          /*****************************************************************************
                          * Initializes the detail employee query.
                          *****************************************************************************
                          */

                          OAApplicationModule am = pageContext.getApplicationModule(webBean);
                          OAViewObject summaryVO = (OAViewObject)am.findViewObject("LANLSupplDocsSummaryVO1");

                          if (summaryVO != null)
                          {
                          // Do not reinitialize the VO unless needed.
                          String stringReqHeaderId = pageContext.getParameter("REQ_ID");
                          Number defaultReqHeaderId = null;

                          try
                          {
                          defaultReqHeaderId = new Number(stringReqHeaderId);
                          }
                          catch(Exception e)
                          {
                          throw new OAException("ICX", "XXXL_INVALID_NUMBER");
                          }

                          summaryVO.setWhereClauseParams(null);
                          summaryVO.setWhereClauseParam(0,defaultReqHeaderId);
                          summaryVO.executeQuery();

                          // set this value for subsequent form buttons pressed
                          OAViewObject vo = (OAViewObject)am.findViewObject("LANL838cPVO1");
                          OARow row = (OARow)vo.first();

                          if(stringReqHeaderId == null)
                          {
                          throw new OAException("ICX", "XXXL_BC");
                          }
                          else
                          {
                          row.setAttribute("lReqID",stringReqHeaderId);
                          }

                          }


                          OATableBean table = (OATableBean)webBean;
                          table.prepareForRendering(pageContext);

                          DataObjectList columnFormats = table.getColumnFormats();
                          DictionaryData columnFormat = null;
                          int childIndex = pageContext.findChildIndex(table, "DOC_STATUS");
                          columnFormat =(DictionaryData)columnFormats.getItem(childIndex);
                          columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);

                          // OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultsTable");

                          if(table != null)
                          {
                          OAButtonBean m = (OAButtonBean)table.findChildRecursive("DocLauncher");
                          OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "Meaning");
                          OADataBoundValueViewObject tip2 = new OADataBoundValueViewObject(m, "ButtonPrompt");
                          m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
                          m.setAttributeValue(oracle.cabo.ui.UIConstants.TEXT_ATTR,tip2);
                          }
                          else
                          {
                          throw new OAException("ICX", "XXXL_BC");
                          }
                          }
                          • 10. Re: Getting error when trying to execute VO query.
                            AnilSharma
                            Now what exactly the error you are getting and when.

                            Thanks
                            --Anil                                                                                                                                                                                           
                            • 11. Re: Getting error when trying to execute VO query.
                              RLChristenson
                              I'm getting a null pointer exception. I figured out that I wasn't initializing the PVO and therefore got an error when I tried to do the setAttribute of the PVO attribute above.

                              At this point, it might be helpful to restate what I'm doing. I have a table based off a VO and I use dataBoundValue to set the destination of one of these columns (displayed as a button) to a child page. NOTE, this is not a submitButton. just a regular button. I also set a PVO transient attribute I set during the processRequest of the parent page. I've now gotten to the point that the child page is being launched correctly by the button, but I need to be able pull the transient attribute back in and I'm getting a nullPointerException. Here's the error stack:


                              Logout




                              Error Page


                              Exception Details.

                              oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
                                   at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
                                   at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
                                   at oa_html._OA._jspService(_OA.java:84)
                                   at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
                                   at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
                                   at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
                                   at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
                                   at oracle.jsp.JspServlet.service(JspServlet.java:156)
                                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
                                   at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
                                   at org.apache.jserv.JServConnection.run(JServConnection.java:294)
                                   at java.lang.Thread.run(Thread.java:735)
                              ## Detail 0 ##
                              java.lang.NullPointerException
                                   at lanl.oracle.apps.icx.por.req.webui.LANLSupplDocs838cCO.processRequest(LANLSupplDocs838cCO.java:67)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
                                   at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
                                   at oa_html._OA._jspService(_OA.java:84)
                                   at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
                                   at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
                                   at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
                                   at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
                                   at oracle.jsp.JspServlet.service(JspServlet.java:156)
                                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
                                   at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
                                   at org.apache.jserv.JServConnection.run(JServConnection.java:294)
                                   at java.lang.Thread.run(Thread.java:735)
                              java.lang.NullPointerException
                                   at lanl.oracle.apps.icx.por.req.webui.LANLSupplDocs838cCO.processRequest(LANLSupplDocs838cCO.java:67)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
                                   at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
                                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                                   at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
                                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
                                   at oa_html._OA._jspService(_OA.java:84)
                                   at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
                                   at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
                                   at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
                                   at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
                                   at oracle.jsp.JspServlet.service(JspServlet.java:156)
                                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
                                   at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
                                   at org.apache.jserv.JServConnection.run(JServConnection.java:294)
                                   at java.lang.Thread.run(Thread.java:735)
                              • 12. Re: Getting error when trying to execute VO query.
                                Reetesh Sharma
                                Hi RL,

                                As you told that you are not initializing VO, so you have to initialize it before setting any attribute of PPR VO and here is the code for initialization:

                                public void initializePVO()
                                {
                                OAViewObject appPropsVO = (OAViewObject)findViewObject("XXEGASRRequiredPVO1");

                                if (appPropsVO != null)
                                {
                                // This checkes the in-memory cache (doesn't cause a database hit).
                                // If the VO doesn't include a row yet, create and insert one.
                                if (appPropsVO.getFetchedRowCount() == 0)
                                {

                                Row row ;
                                appPropsVO.setMaxFetchSize(0);
                                appPropsVO.executeQuery();
                                row = appPropsVO.createRow();
                                appPropsVO.insertRow(row);
                                row.setNewRowState(Row.STATUS_INITIALIZED);

                                }
                                }
                                }

                                I saw your error stack(at lanl.oracle.apps.icx.por.req.webui.LANLSupplDocs838cCO.processRequest(LANLSupplDocs838cCO.java:67)), just check what is the line written at line no 67, and paste it here if your problem persists even after initializing the PPR VO.

                                Hope this will help, have a nice day.

                                Regards,
                                Reetesh Sharma
                                • 13. Re: Getting error when trying to execute VO query.
                                  RLChristenson
                                  Thanks so much Reetesh.

                                  I have initialized the VO and seem to be setting the PVO parameter successfully. Now I'm getting another error when I try to READ that PVO
                                  • 14. Re: Getting error when trying to execute VO query.
                                    RLChristenson
                                    Thanks so much Reetesh.

                                    I have initialized the VO and seem to be setting the PVO parameter successfully. Now I'm getting another error when I try to READ that PVO transient attribute. Here's the code in my processRequest of my child page. I want to pull the PVO attribute set in the parent page, but the VO is null again. I can't requery it, because it was just a transient attribute. How do i pass the value to the child page?

                                    Regards,



                                    NOTE: you'll see me throwing an error below if paramVO get count is 0. how do I resolve this and successully pass an attribute from the parent page to a child page? dont forget, the URL of my button is dynamically assigned with dataBoundValue.


                                    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                                    {
                                    super.processRequest(pageContext, webBean);

                                    // If isBackNavigationFired = false, we're here after a valid navigation
                                    // (the user selected the Supplemental Docs button) and we should proceed
                                    // normally and initialize a new doc.

                                    if (!pageContext.isBackNavigationFired(false))
                                    {
                                    // We indicate that we are starting the create transaction (this
                                    // is used to ensure correct Back button behavior).

                                    TransactionUnitHelper.startTransactionUnit(pageContext, "docCreate838c");

                                    // This test ensures that we don't try to create a new doc if
                                    // we had a JVM failover, or if a recyled application module
                                    // is activated after passivation. If these things happen, BC4J will
                                    // be able to find the row that you created so the user can resume
                                    // work.

                                    if (!pageContext.isFormSubmission())
                                    {
                                    OAApplicationModule am = pageContext.getApplicationModule(webBean);

                                    // set this value for subsequent form buttons pressed
                                    OAViewObject vo = (OAViewObject)am.findViewObject("LANL838cVO1");
                                    OAViewObject paramVO = (OAViewObject)am.findViewObject("LANL838cPVO1");
                                    OARow paramRow = (OARow)paramVO.first();

                                    String stringReqHeaderId = null;

                                    if (paramVO.getFetchedRowCount() == 0)
                                    {
                                    throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
                                    }
                                    else
                                    {
                                    stringReqHeaderId = (String)vo.getCurrentRow().getAttribute("lReqID");
                                    // stringReqHeaderId = (String)paramRow.getAttribute("lReqID");
                                    }



                                    Number defaultReqHeaderId = null;

                                    try
                                    {
                                    defaultReqHeaderId = new Number(stringReqHeaderId);
                                    }
                                    catch(Exception e)
                                    {
                                    throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
                                    }

                                    vo.setWhereClauseParams(null);
                                    vo.setWhereClauseParam(0,defaultReqHeaderId);
                                    vo.executeQuery();

                                    if (vo.getFetchedRowCount() == 0)
                                    {
                                    vo.insertRow(vo.createRow());
                                    Row voRow = (Row)vo.first();
                                    voRow.setNewRowState(Row.STATUS_INITIALIZED);
                                    voRow.setAttribute("ReqHeaderId",defaultReqHeaderId);
                                    }
                                    }
                                    else
                                    {
                                    if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "docCreate838c", true))
                                    {
                                    // We got here through some use of the browser "Back" button, so we
                                    // want to display a stale data error and disallow access to the page.
                                    // If this were a real application, we would probably display a more
                                    // context-specific message telling the user she can't use the browser
                                    // "Back" button and the "Create" page. Instead, we wanted to illustrate
                                    // how to display the Applications standard NAVIGATION ERROR message.

                                    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
                                    pageContext.redirectToDialogPage(dialogPage);
                                    }

                                    }
                                    }
                                    1 2 Previous Next