9 Replies Latest reply on Mar 30, 2012 7:28 AM by 923269

    Null Pointer Exception in process Request in Controller - Urgent

    923269
      Hi,

      I had attached a contoller to LOV field named as PO NUM. I wrote below code in my Controller, it is running perfectly fine in jdevloper but when I am deploying it in oracle application and trying to access LOV of this field it is giving me NULL Pointer Exception:

      Code:

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

      String var_customer_name = null;

      System.out.println("varCust (ponum controller)-> "+pageContext.getSessionValue("varCust"));

      OAApplicationModule am = pageContext.getApplicationModule(webBean);
      OAViewObject vo=(OAViewObject)am.findViewObject("CustomerPONumVO1");

      var_customer_name= (String)pageContext.getSessionValue("varCust") ;
      if (var_customer_name!=null && !"".equals(var_customer_name.trim()))
      {

      System.out.println("RowCount (ponum controller)-> "+vo.getRowCount());
      vo.clearCache();
      vo.setWhereClause("CUSTOMER_NAME = :1");
      vo.setWhereClauseParams(null);
      System.out.println("CustomerName (ponum controller)-> "+var_customer_name);
      vo.setWhereClauseParam(0,var_customer_name);
      vo.executeQuery();
      Row row = vo.first();
      vo.setCurrentRow(row);
      System.out.println("After exec query - (ponum controller)-> "+var_customer_name);
      System.out.println("RowCount (ponum controller)-> "+vo.getRowCount());
      }
      else
      {

      System.out.println("Else condition (ponumn controller)");
      String where = "1 = 1";
      vo.setWhereClauseParams(null);
      vo.setWhereClause(where);
      vo.executeQuery();
      System.out.println("RowCount (ponumn controller)-> "+vo.getRowCount());

      }

      }



      /**
      * Procedure to handle form submissions for form elements in
      * a region.
      * @param pageContext the current OA page context
      * @param webBean the web bean corresponding to the region
      */
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
      {
      super.processFormRequest(pageContext, webBean);

      }




      Exception:
      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.OAListOfValuesHelper.processRequest(OAListOfValuesHelper.java:439)
           at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processRequest(OAListOfValuesBean.java:413)
           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:2348)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1747)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
           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:619)
      ## Detail 0 ##
      java.lang.NullPointerException
           at ciena.oracle.apps.cie.revrec.custompomain.lov.webui.CustomerPONumCO.processRequest(CustomerPONumCO.java:70)
           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.OAListOfValuesHelper.processRequest(OAListOfValuesHelper.java:439)
           at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processRequest(OAListOfValuesBean.java:413)
           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:2348)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1747)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
           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:619)
      java.lang.NullPointerException
           at ciena.oracle.apps.cie.revrec.custompomain.lov.webui.CustomerPONumCO.processRequest(CustomerPONumCO.java:70)
           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.OAListOfValuesHelper.processRequest(OAListOfValuesHelper.java:439)
           at oracle.apps.fnd.framework.webui.beans.layout.OAListOfValuesBean.processRequest(OAListOfValuesBean.java:413)
           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:2348)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1747)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
           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:619)



      Please advice something it is really urgent.


      Best Regards
      Ragni Gupta