10 Replies Latest reply on Mar 14, 2008 9:25 PM by Sergey Smirnov

    Application stability issues

    rachana patel Newbie

      Hello everyone,
      Though my application was released some 5 months back now, but I know there are certain strange stability issues.

      Here is the env:
      OAS 10.1.2 (OC4J 10.1.3)
      richFaces 3.1.4 GA
      Tomahawk 1.1.6

      Here is brief detail about application design:
      Its is one page application. So basically parts of pages are getting repainted based on different kinds of requests. Every submit is an ajax submit. When a user clicks on the link to application i.e he invokes http://.. /.. /faces/index.jsp. In here I call the database and put the results in session.
      Here is the code of index.jsp:

       <body onload="loadInitialData()"><h:form id="form1">
       <a4j:jsFunction name="loadInitialData" id="loadFunction" action="#{startBean.loadSession}"/>
       <h:inputHidden id="ibmessage" value="#{startBean.loadMessage}" />
       <h:inputHidden id="LoginHome" value="#{startBean.LoginHome}" />
       </h:form>
       </body>
       </html>

      Though loadFunction I called using jsFunction, but it returns either success or failure which determines which page to redirect to.

      This result from loadFunction will have the data to pre-populate many drop-downs and text-boxes in next page. Now the page is redirected to
      http://.. /../faces /search.jsp (the next page)
      Search.jsp has has following displayed by default:

      - Header
      - A bar which acts like a tab holder (it hides/shows different divs)
      - 2 more section below it which basically perform search and take you to next sections.

      I have done all sorts of exception handling and I use A4J.AJAX.onExpired to catch session timeout. I also use A4J.AJAX.onError to catch any JSP error.

      Now here are the issues:
      1) Many a times first page load is not complete (happens when link to index.jsp is called). Only the header and bar below will show up.

      2) At times ( rarely though usually when application is left unattended for long time) I get javax.faces.el.EvaluationException: java.lang.NullPointerException can not find "countries"
      Please note that countries is a dropdown whose value was coming from
      loadFunction in index.jsp. It was put in session in index.jsp. Drop-down in search.jsp used values from this session to populate countries drop-down. Neither A4J.AJAX.onExpired nor A4J.AJAX.onError catch it. It comes on the page as server 500 error.

      3) Whenever some button is clicked I start showing a spinning wheel till the response comes back. At times wheels is just spinning for long time and nothing is happening. What I observed at times the ajax action is not at all getting called. Lets say if this was the command button:

      <a4j:commandButton id="commandButton3" action="#{backing_CustSearchBean.serchCustomer}"
      oncomplete="this.disabled='false',handleSearchCustEvents();"
      reRender="searchForm, form1, qcForm, rtform:cartForm" image="images/btn_search.gif" onclick="showWheel();this.disabled='true';"
       >


      Then only onclick is invoked so the spin wheel is showing but it never actually made to action. Hence even oncomplete functions are not triggered and so nothing stops the spinning wheel.

      Any idea on why these issues might be occurring will be highly appreciated. Please help!