with lot of Analysis, below are the some important points.
Reason: - To dupe the problem, I have to do “Import” and “Restore” operation many time. The problem is intermittent and the log does not give proper information. The solution are trying based on below points.
1. Any stream which does not closed properly.
2. Any
Thread issue.
3. Any variable setting and reading issue.
The ajax region is applied to only the status panel Grid. It is poll for every 3 seconds. It check the status for the backend job.
The ArrayList display in the datatable is not a part of ajax implementation.
The issue is getting during the “Restore” operation.
Probable Root cause: -
When I debug the code, the method to ge the ArrayList is invoke every three seconds, which should not be the case.
During the “Restore” operation the ArrayList is creating the issue [Related to point no 3]. This is the reason why “NoSuchElementException” is thrown.
If I can limit the implementation of the ajax to only the status panel grid, then the problem may be resolved.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The code snippet of my JSF
<!-- AJAX for Generation status -->
<a4j:poll id="pollingTextArea"
reRender="generationStatus"
interval="3000" enabled="true" />
<!-- Generation status Panel-->
<h:panelGrid id="generationStatus" columns="2"
styleClass="explanatoryText">
<h:column>
<h:outputText value="#{bundle.generationStatus}:"/>
</h:column>
<h:column>
<h:outputText
value="#{EventHandler.generateStatus}"
styleClass="errorDetails">
</h:outputText>
</h:column>
</h:panelGrid>
<h:message id="errorMessage" for="upForm"
styleClass="error"/>
<%
/* Button bar */
%>
<n:searchResultsButtonBar
.................button declaration.....
/>
then data table handler which get the ArrayList. This part is being called for every two second. Only the method generationStatus should be called every three seconds.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
thanks in advance
Ranjan