9 Replies Latest reply on Apr 15, 2008 8:01 PM by admin.admin.email.tld

    SeamPhaseListener: NullPointerException

    admin.admin.email.tld

      This one results in the infamous: The conversation ended, timed out or was processing another request error on the home.xhtml.  The rich:suggestionBox (currently commented out) was causing this error as well.  So most likely this is due to Richfaces eventQueue and interaction with Seam but not sure exactly how to handle or fix this.  The only a4j/Rich components in the .xhtml are a4j:form, a4j:commandButton, rich:panel, rich:dataTable, rich:column. 


      I've tried Seam2.0.0.GA with RF3.1.3.GA.  I then tried Seam2.0.1.GA with RF3.2.0.GA.  Same results.  The conversation ended, ... error is not always reproduceable (i.e. the use case sometimes follows to its logical conclusion and is successful).


      Please help as this one is difficult to figure out what's the root cause.  thx.


      .xhtml:


      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:a4j="http://richfaces.org/a4j"
           xmlns:rich="http://richfaces.org/rich"
           xmlns:s="http://jboss.com/products/seam/taglib"
           template="layout/template.xhtml">
           
      <ui:define name="body">
      <h:messages globalOnly="true" styleClass="message" />
      
                <script type="text/javascript">
                
                          function disableUserLocation()
                          {
                               document.getElementById('locationform:userlocationno').disabled = true;
                               return true;
                          }
                          
                          function confirmMode(modeString, argBarCode)
                          {
                               disableUserLocation();
                               var returnVal = false;
                                var confirmStr = "Do you wish to "+modeString;
                                var answer;
                                
                                confirmStr = confirmStr + " Hardware Equipment "+ argBarCode + " ?";
                                answer=window.confirm(confirmStr);
                                if (answer==true)
                                {
                                     returnVal = true;
                               } 
                               else 
                               { 
                                    returnVal = false;
                               }
                               return returnVal;
                          }     
                          
                          function checkUserLocation()
                          {
                               var returnVal = true;
                               var compid  = document.getElementById('locationform:tempcompid').value;
                               var compmsg = document.getElementById('locationform:tempmsg').value;                    
      
                               if ("YES" == compmsg)
                               {
                                    returnVal = false;
                               }
                                    return returnVal;
                          }
                          
                          function clearUserLocMsg()
                          {
                               // document.getElementById('userLocMsg').innerText ="";
                               return true;
                          }
                          
                          function disableBrowserBackBtn() {
                          // window.open("/SHIMSProject/TechDeployToUser.seam",'TheNewpop','toolbar=1, location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); 
                          }
                          
      
                </script>            
      <body oncontextmenu="return false;">
      
      <b style="font-size: 18px">Use case # 3 - Technician Deployment to User</b><br></br><br></br>
      
      <br></br>
           <rich:panel>
           <b><h:outputText id="techLocMsg"      value="#{techDeployToUser.techLocMsg}" style="color: Red"></h:outputText></b><br></br><br></br>     
      
                 <a4j:form id="locationform">
                               <b style="font-size: 14px"><u><h:outputText id="techLocname" value="#{techDeployToUser.techLocationName}"></h:outputText></u></b>
                               <h:inputText id="userlocationno"       value="#{techDeployToUser.locNo}"  valueChangeListener="#{techDeployToUser.validateUserLocation}" maxlength="4" size="26">
                                   <!-- <a4j:support event="onblur"            oncomplete="return clearUserLocMsg();"     reRender="userQueueTable, userLocMsg, techLocMsg, userlocname, assignButtonA4JForm, techQueueTable"/>  -->          
                                   <input type="hidden"                     name="inputlocno" value="#{techDeployToUser.locNo}"/>
                              </h:inputText>
                              <a4j:commandButton id="locationSubmit" value="Search" type="button" oncomplete="return clearUserLocMsg();"     reRender="userQueueTable, userLocMsg, techLocMsg, userlocname, assignButtonA4JForm, techQueueTable"/>
                              <br></br>
                               
                               <!-- 
                            <rich:suggestionbox id="suggestionboxid" requestDelay="1000" ignoreDupResponses="true" eventsQueue="myqueue" width="182" height="80"   ajaxSingle="true" limitToList="false" border="5"  for="userlocationno"   suggestionAction="#{techDeployToUser.autoSuggestLocNosList}" var="locNosList"  fetchValue="#{locNosList.locationNo}">
                                    <h:column>
                                         <b> <h:outputText id="sellocno" value="#{locNosList.locationNo}"/> </b>
                                    </h:column>
                               </rich:suggestionbox>
                                -->
                                
                </a4j:form>               
           </rich:panel>
           
           <rich:panel id="userlocpanel">
           <b><h:outputText id="userLocMsg"      value="#{techDeployToUser.userLocMsg}" style="color: Red"></h:outputText></b>
            <br></br><br></br>     
                 <b style="font-size: 14px"><u><h:outputText id="userlocname" value="#{techDeployToUser.userLocationName}"/></u></b> <br></br><br></br>
                 <a4j:form id ="removeButtonA4JForm"      ajaxSubmit="true"      reRender="techQueueTable, userQueueTable, userLocMsg, techLocMsg, submit">
                     <rich:dataTable id="userQueueTable" value="#{techDeployToUser.hardwareEquipmentForUserLocation}"     var="userQueueObject" columnClasses="center">                                   
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Barcode"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.barCode}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Owner"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.historicalOwnerTypeDesc}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Vendor"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.manufacturer}"/></b>
                               </rich:column>
      
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Type"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.type}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Model"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.model}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Status"/></f:facet></u></b>
                                    <b><h:outputText value="#{userQueueObject.historicalStatus}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                         <b><u>     <f:facet name="header"><h:outputText value="Remove from User"/></f:facet></u></b><br></br>
                                              
                                                   <h:commandButton id="removebtn"       value="Remove"           action="#{techDeployToUser.techHardwareRemovalFromUser}" onclick="return confirmMode('Remove', '#{userQueueObject.barCode}');"/>
                                                   <input type="hidden" name="paramRemoveBarCode" value="#{userQueueObject.barCode}"/>
                                                   <input type="hidden" name="isRemoveBtnClicked" value="Y"/>                    
                               </rich:column>
                     </rich:dataTable>
                     </a4j:form>     
          </rich:panel>
          
          <br></br>
           <br></br>     
               
           <rich:panel>     
                     <rich:dataTable  id="techQueueTable" value="#{techDeployToUser.assignedToTechHardwareList}"     var="tbHardwareObject" >                                   
                     
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Barcode"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.barCode}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Owner"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.historicalOwnerTypeDesc}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Vendor"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.manufacturer}"/></b>
                               </rich:column>
      
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Type"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.type}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Model"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.model}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Assigned By"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.assignedBy}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Assigned Date"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.assignedDate}"/></b>
                               </rich:column>
                               
                               <rich:column>
                                    <b><u><f:facet name="header"><h:outputText value="Status"/></f:facet></u></b>
                                    <b><h:outputText value="#{tbHardwareObject.historicalStatus}"/></b>
                               </rich:column>
      
                               <rich:column>
                                    <b><u>     <f:facet name="header"><h:outputText value="Assign To User"/></f:facet></u></b><br></br>
                                         <a4j:form id ="assignButtonA4JForm" ajaxSubmit="true" reRender="techQueueTable, userQueueTable, userLocMsg, techLocMsg, submit">
                                              <h:commandButton id="assignbtn" disabled="#{techDeployToUser.assignToTechBtn}" value="Assign" action="#{techDeployToUser.techHardwareAssignmentsToUser}" onclick="return confirmMode('Assign', '#{tbHardwareObject.barCode}');">
                                              </h:commandButton>
                                              <input type="hidden" name="paramAssignBarCode" value="#{tbHardwareObject.barCode}"/>
                                              <input type="hidden" name="isAssignBtnClicked" value="Y"/>
                                              <br></br>
                                         </a4j:form>     
                               </rich:column>                         
                          </rich:dataTable>
         </rich:panel>  
                     
          
          <rich:panel>
                     <!-- <a4j:form id="deploytouserbtns">   -->
                     <h:form>
                          <h:commandButton id="submit"      value="Submit Technician Changes"      action="#{techDeployToUser.submitNewlyAssignedEquipment}"     onclick="return confirmMode('Submit','');"     disabled="#{techDeployToUser.submitByTechBtn}"/>                    
                          <input type="hidden" name="isSubmitBtnClicked" value="Y"/>
                          <h:commandButton id="cancel"      value="Cancel Technician Changes"      action="#{techDeployToUser.cancel}"     disabled="false"          onclick="return confirmMode('Cancel','');"/>
                          <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
                     </h:form>     
                     <!-- </a4j:form>   -->    
           </rich:panel>    
      </body>   
      </ui:define>     
      </ui:composition>
      



      stack trace:


      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.afterPhase
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: RENDER_RESPONSE 6
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.beforeTransactionCompletion
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.afterTransactionCompletion
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.persistence.persistenceContexts
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Manager] Storing conversation state: 10
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.contexts.FacesLifecycle] After render response, destroying contexts
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.contexts.Contexts] destroying business process context
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.contexts.Contexts] flushing server-side conversation context
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2008-04-10 15:52:16,090 DEBUG [org.jboss.seam.contexts.FacesLifecycle] <<< End JSF request for /SHIMS/TechDeployToUser.seam
      2008-04-10 15:52:16,090 ERROR [org.jboss.seam.jsf.SeamPhaseListener] uncaught exception
      java.lang.NullPointerException
           at org.apache.catalina.connector.Request.parseParameters(Request.java:2409)
           at org.apache.catalina.connector.Request.getParameterNames(Request.java:1073)
           at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:371)
           at javax.servlet.ServletRequestWrapper.getParameterNames(ServletRequestWrapper.java:178)
           at com.sun.faces.context.RequestParameterMap.getEntryIterator(ExternalContextImpl.java:1174)
           at com.sun.faces.context.BaseContextMap$EntrySet.iterator(ExternalContextImpl.java:575)
           at com.sun.faces.context.BaseContextMap$BaseSet.size(ExternalContextImpl.java:563)
           at java.util.Collections$UnmodifiableCollection.size(Unknown Source)
           at java.util.AbstractMap.size(Unknown Source)
           at java.util.Collections$UnmodifiableMap.size(Unknown Source)
           at org.jboss.seam.contexts.EntityBeanMap.passivateAll(EntityBeanMap.java:65)
           at org.jboss.seam.contexts.AbstractEntityBeanCollection.passivate(AbstractEntityBeanCollection.java:43)
           at org.jboss.seam.contexts.ServerConversationContext.isAttributeDirty(ServerConversationContext.java:307)
           at org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:280)
           at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:371)
           at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
           at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:502)
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:235)
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:182)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
           at org.ajax4jsf.Filter.doFilter(Filter.java:175)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Unknown Source)
      2008-04-10 15:52:16,090 ERROR [org.jboss.seam.jsf.SeamPhaseListener] swallowing exception
      java.lang.NullPointerException
           at org.apache.catalina.connector.Request.parseParameters(Request.java:2409)
           at org.apache.catalina.connector.Request.getParameterNames(Request.java:1073)
           at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:371)
           at javax.servlet.ServletRequestWrapper.getParameterNames(ServletRequestWrapper.java:178)
           at com.sun.faces.context.RequestParameterMap.getEntryIterator(ExternalContextImpl.java:1174)
           at com.sun.faces.context.BaseContextMap$EntrySet.iterator(ExternalContextImpl.java:575)
           at com.sun.faces.context.BaseContextMap$BaseSet.size(ExternalContextImpl.java:563)
           at java.util.Collections$UnmodifiableCollection.size(Unknown Source)
           at java.util.AbstractMap.size(Unknown Source)
           at java.util.Collections$UnmodifiableMap.size(Unknown Source)
           at org.jboss.seam.contexts.EntityBeanMap.passivateAll(EntityBeanMap.java:65)
           at org.jboss.seam.contexts.AbstractEntityBeanCollection.passivate(AbstractEntityBeanCollection.java:43)
           at org.jboss.seam.contexts.ServerConversationContext.isAttributeDirty(ServerConversationContext.java:307)
           at org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:280)
           at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:371)
           at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
           at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:502)
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:235)
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:182)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
           at org.ajax4jsf.Filter.doFilter(Filter.java:175)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Unknown Source)

        • 1. Re: SeamPhaseListener: NullPointerException
          admin.admin.email.tld

          When user clicks one of the commandButtons, I think the SFSB method is taking too long to complete processing in some cases and the concurrent-request-timeout needs to be increased from 10000ms - 15000ms possibly.  That seems pretty high if that's the fix and maybe the method/query needs to be optimized then... edit: I tried that and it didn't work.  Perhaps I will add an EJB interceptor to see what method is the bottle-neck.


          when I replaced two of the a4j:form tags with h:form tags, I was unable to reproduce the error.  So it's a matter of fixing the problem and use a4j:form so that the page doesn't refresh or just using h:form as a workaround.


          • 2. Re: SeamPhaseListener: NullPointerException
            admin.admin.email.tld

            just reproduced with h:form...

            • 3. Re: SeamPhaseListener: NullPointerException
              dipas

              I'm not sure about this but you can try to increment the
              concurrent-request-timeout in components.xml


                  <core:manager
                          concurrent-request-timeout="2000"
                          conversation-timeout="1200000"
                          conversation-id-parameter="cid"/>
              


              • 4. Re: SeamPhaseListener: NullPointerException
                admin.admin.email.tld

                thanks.  I tried the following but reproduced the error again:


                   <core:manager concurrent-request-timeout="30000" 
                                 conversation-timeout="120000" 
                                 conversation-id-parameter="cid"/>



                It seems to hang (sometimes) when I click on a commandButton.  It's interesting and difficult b/c I can't reproduce it consistently.

                • 5. Re: SeamPhaseListener: NullPointerException
                  jpviragine.jpviragine.gmail.com

                  Arbi,


                  Try to disable seam debug mode


                  <core:init debug="false" jndi-pattern="@jndiPattern@" />




                  in components.xml



                  We have trouble with concurrent requests and debug mode on


                  • 6. Re: SeamPhaseListener: NullPointerException
                    pmuir

                    If a method is taking a long time to execute, you probably don't want to execute it as part of the AJAX request (otherwise you'll be waiting a long time to return to the user to do other stuff - and calls to conversational components must be synchronous) - instead kick of the work from the request in a @Asynchronous method and poll for its completion. 

                    • 7. Re: SeamPhaseListener: NullPointerException
                      admin.admin.email.tld

                      thx I tried this and it I still reproduced the error.

                      • 8. Re: SeamPhaseListener: NullPointerException
                        admin.admin.email.tld

                        Ok, so I changed the facelet to the following below (yeah it's messy with comments but the point is that there are no more a4j:form tags (using h:form) and this is what it looks like (see below)).


                        I executed a use case on that JSF and the hanging behavior reproduced (and then the conversation timed out, etc. error displayed).  The hanging is for about 10 secs and then it renders the home.xhtml with the conversation timed out, etc. error.


                        The SFSB method that is supposed to get executed when I click the  commandButton to assign did not execute (I saw no references to the method name in the server.log, there is a log statement when the method starts, plus I have an interceptor configure for all methods to out they have started).


                        I immediately re-executed the use case (data and entry order, etc. the exact same) and the method did fire.  I have setup an EJB3 interceptor as follows:


                        2008-04-14 09:39:30,311 INFO  [com.cox.shims.utils.ProfilingInterceptor] *** Method public void com.cox.shims.session.TechDeployToUserAction.techHardwareAssignmentsToUser() executed in 0ms ***



                        So at this point I'm not sure why sometimes the methods (one to assign and one to remove) exec and sometimes they don't...


                        There are @Begin and @End annotated methods on public methods in the SFSB.  As I understand it, the other public and private methods in the SFSB don't need to have a @Begin or @End annotations as well (i.e. one of each per SFSB will usually suffice unless there are alternate ways of starting and ending a conversation in a particular use case).


                        .xhtml:


                        <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                                              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                        
                        <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                             xmlns:ui="http://java.sun.com/jsf/facelets"
                             xmlns:h="http://java.sun.com/jsf/html"
                             xmlns:f="http://java.sun.com/jsf/core"
                             xmlns:a4j="http://richfaces.org/a4j"
                             xmlns:rich="http://richfaces.org/rich"
                             xmlns:s="http://jboss.com/products/seam/taglib"
                             template="layout/template.xhtml">
                             
                        <ui:define name="body">
                        <h:messages globalOnly="true" styleClass="message" />
                        
                                  <script type="text/javascript">
                                  
                                            function disableUserLocation()
                                            {
                                                 document.getElementById('locationform:userlocationno').disabled = true;
                                                 return true;
                                            }
                                            
                                            function confirmMode(modeString, argBarCode)
                                            {
                                                 disableUserLocation();
                                                 var returnVal = false;
                                                  var confirmStr = "Do you wish to "+modeString;
                                                  var answer;
                                                  
                                                  confirmStr = confirmStr + " Hardware Equipment "+ argBarCode + " ?";
                                                  answer=window.confirm(confirmStr);
                                                  if (answer==true)
                                                  {
                                                       returnVal = true;
                                                 } 
                                                 else 
                                                 { 
                                                      returnVal = false;
                                                 }
                                                 return returnVal;
                                            }     
                                            
                                            function checkUserLocation()
                                            {
                                                 var returnVal = true;
                                                 var compid  = document.getElementById('locationform:tempcompid').value;
                                                 var compmsg = document.getElementById('locationform:tempmsg').value;                    
                        
                                                 if ("YES" == compmsg)
                                                 {
                                                      returnVal = false;
                                                 }
                                                      return returnVal;
                                            }
                                            
                                            function clearUserLocMsg()
                                            {
                                                 // document.getElementById('userLocMsg').innerText ="";
                                                 return true;
                                            }
                                            
                                            function disableBrowserBackBtn() {
                                            // window.open("/SHIMSProject/TechDeployToUser.seam",'TheNewpop','toolbar=1, location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); 
                                            }
                                            
                        
                                  </script>            
                        <!-- <body oncontextmenu="return false;">  -->
                        
                        <b style="font-size: 18px">Use case # 3 - Technician Deployment to User</b><br></br><br></br>
                        
                        <br></br>
                             <rich:panel>
                             <b><h:outputText id="techLocMsg"      value="#{techDeployToUser.techLocMsg}" style="color: Red"></h:outputText></b><br></br><br></br>     
                        
                                   <!-- <a4j:form id="locationform">   -->
                                   <h:form id="locationform">
                                                 <b style="font-size: 14px"><u><h:outputText id="techLocname" value="#{techDeployToUser.techLocationName}"></h:outputText></u></b>
                                                 <h:inputText id="userlocationno"       value="#{techDeployToUser.locNo}"  valueChangeListener="#{techDeployToUser.validateUserLocation}" maxlength="4" size="26">
                                                     <!-- <a4j:support event="onblur"            oncomplete="return clearUserLocMsg();"     reRender="userQueueTable, userLocMsg, techLocMsg, userlocname, assignButtonA4JForm, techQueueTable"/>  -->          
                                                     <input type="hidden"                     name="inputlocno" value="#{techDeployToUser.locNo}"/>
                                                </h:inputText>
                                                <!-- <a4j:commandButton id="locationSubmit" value="Search" type="button" oncomplete="return clearUserLocMsg();"     reRender="userQueueTable, userLocMsg, techLocMsg, userlocname, assignButtonA4JForm, techQueueTable"/>   -->
                                                <h:commandButton id="locationSubmit" value="Search"/>
                                                <br></br>
                                                 
                                                 <!-- 
                                              <rich:suggestionbox id="suggestionboxid" requestDelay="1000" ignoreDupResponses="true" eventsQueue="myqueue" width="182" height="80"   ajaxSingle="true" limitToList="false" border="5"  for="userlocationno"   suggestionAction="#{techDeployToUser.autoSuggestLocNosList}" var="locNosList"  fetchValue="#{locNosList.locationNo}">
                                                      <h:column>
                                                           <b> <h:outputText id="sellocno" value="#{locNosList.locationNo}"/> </b>
                                                      </h:column>
                                                 </rich:suggestionbox>
                                                  -->
                                                  
                                  <!-- </a4j:form>   -->     
                                  </h:form>          
                             </rich:panel>
                             
                             <rich:panel id="userlocpanel">
                             <b><h:outputText id="userLocMsg"      value="#{techDeployToUser.userLocMsg}" style="color: Red"></h:outputText></b>
                              <br></br><br></br>     
                                   <b style="font-size: 14px"><u><h:outputText id="userlocname" value="#{techDeployToUser.userLocationName}"/></u></b> <br></br><br></br>
                                   <!-- <a4j:form id ="removeButtonA4JForm"      ajaxSubmit="true"      reRender="techQueueTable, userQueueTable, userLocMsg, techLocMsg, submit">   -->
                                   
                                       <rich:dataTable id="userQueueTable" value="#{techDeployToUser.hardwareEquipmentForUserLocation}"     var="userQueueObject" columnClasses="center">                                   
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Barcode"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.barCode}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Owner"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.historicalOwnerTypeDesc}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Vendor"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.manufacturer}"/></b>
                                                 </rich:column>
                        
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Type"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.type}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Model"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.model}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Status"/></f:facet></u></b>
                                                      <b><h:outputText value="#{userQueueObject.historicalStatus}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                           <b><u>     <f:facet name="header"><h:outputText value="Remove from User"/></f:facet></u></b><br></br>
                                                                <h:form id="removeButtonA4JForm">
                                                                     <h:commandButton id="removebtn"       value="Remove"           action="#{techDeployToUser.techHardwareRemovalFromUser}" onclick="return confirmMode('Remove', '#{userQueueObject.barCode}');"/>
                                                                     <input type="hidden" name="paramRemoveBarCode" value="#{userQueueObject.barCode}"/>
                                                                     <input type="hidden" name="isRemoveBtnClicked" value="Y"/>          
                                                                </h:form>          
                                                 </rich:column>
                                       </rich:dataTable>
                                       <!--</a4j:form> --> 
                                             
                            </rich:panel>
                            
                            <br></br>
                             <br></br>     
                                 
                             <rich:panel>     
                                  <!-- <a4j:form id ="assignButtonA4JForm" ajaxSubmit="true" reRender="techQueueTable, userQueueTable, userLocMsg, techLocMsg, submit">  -->
                                  
                                       <rich:dataTable  id="techQueueTable" value="#{techDeployToUser.assignedToTechHardwareList}"     var="tbHardwareObject" >                                   
                                       
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Barcode"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.barCode}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Owner"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.historicalOwnerTypeDesc}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Vendor"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.manufacturer}"/></b>
                                                 </rich:column>
                        
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Type"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.type}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Model"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.model}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Assigned By"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.assignedBy}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Assigned Date"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.assignedDate}"/></b>
                                                 </rich:column>
                                                 
                                                 <rich:column>
                                                      <b><u><f:facet name="header"><h:outputText value="Status"/></f:facet></u></b>
                                                      <b><h:outputText value="#{tbHardwareObject.historicalStatus}"/></b>
                                                 </rich:column>
                        
                                                 <rich:column>
                                                      
                                                      <b><u>     <f:facet name="header"><h:outputText value="Assign To User"/></f:facet></u></b><br></br>
                                                      <h:form id ="assignButtonA4JForm">                                   
                                                                <h:commandButton id="assignbtn" disabled="#{techDeployToUser.assignToTechBtn}" value="Assign" action="#{techDeployToUser.techHardwareAssignmentsToUser}" onclick="return confirmMode('Assign', '#{tbHardwareObject.barCode}');">
                                                                </h:commandButton>
                                                                <input type="hidden" name="paramAssignBarCode" value="#{tbHardwareObject.barCode}"/>
                                                                <input type="hidden" name="isAssignBtnClicked" value="Y"/>
                                                                <br></br>     
                                                      </h:form>                               
                                                 </rich:column>                         
                                            </rich:dataTable>
                                       <!-- </a4j:form> -->
                                              
                           </rich:panel>  
                                       
                            
                            <rich:panel>
                                       <!--<a4j:form id="deploytouserbtns"> -->
                                        <h:form>   
                                            <h:commandButton id="submit"      value="Submit Technician Changes"      action="#{techDeployToUser.submitNewlyAssignedEquipment}"     onclick="return confirmMode('Submit','');"     disabled="#{techDeployToUser.submitByTechBtn}"/>                    
                                            <input type="hidden" name="isSubmitBtnClicked" value="Y"/>
                                            <h:commandButton id="cancel"      value="Cancel Technician Changes"      action="#{techDeployToUser.cancel}"     disabled="false"          onclick="return confirmMode('Cancel','');"/>
                                            <a4j:log popup="true" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
                                        </h:form>        
                                       <!--</a4j:form>-->    
                             </rich:panel>    
                        <!-- </body>   -->   
                        </ui:define>     
                        </ui:composition>


                        • 9. Re: SeamPhaseListener: NullPointerException
                          admin.admin.email.tld

                          I tried the following after using a4j:log to determine there is no ajax request/response happening in this JSF (I removed and/or replaced all rich: and a4j: tags with h: equivalents).


                          // AS 041508 - commenting out @Begin for debugging the conversation timed out error
                          //@Begin(join=true)
                          public List getAssignedToTechHardwareList(){
                          ...
                          }



                          Note that the method does not return null.


                          I commented out the @Begin and both @End annotations in this SFSB and now I can’t reproduce the error after several repeated executions of the use case that usually triggers it (there was some sort of pattern, but not 100% reliable to reproduce but it would usually reproduce within a minute of doing a test case, really strange).


                          I added the @Scope annotation as below b/c one of the dataTables was not outputting any rows on the screen, probably b/c the conversation-scoped component was being destroyed w/o the @Begina and @End annotations:



                          @Stateful
                          //AS 041508 - testing session scope for conversation ended error
                          @Scope(ScopeType.SESSION)
                          @Name("techDeployToUser")
                          public class TechDeployToUserAction implements TechDeployToUserLocal{
                          …
                          }




                          Now the problem seems to be fixed.  So the root cause appears to be conversation management related.


                          But I am having persistence issues now, not sure why, the JDBC transactions in the SFSB don’t seem to be committing and there are no exceptions in the log, but that may be an ancillary issue.


                          Obviously I need to use @Begin and @End properly with Conversation scoping unless it’s easier to get it to work with Session scoping and that will suffice for the use case.  Really the use case calls for a conversation-scoped JSF/EJB.


                          From a best practices point of view, I’m not sure it’s ok to use @Begin on a method that is used as a getter for a datatable.  That’s what the prevoius developer was doing in this case.  If I’m not mistaken, that method will be called multiple times per use case as the JSF lifecycle keeps rendering the JSF page.  Typically you’d want a conversation to start (i.e. be marked @Begin) when a user clicks a button, etc.


                          Also this looks like an interesting possible solution for this use case (from the Seam ref doc):


                          If all you want to do before rendering the page is begin a conversation, you could use a built-in action method
                          that does just that:


                          <pages>
                          <page view-id="/messageList.jsp" action="#{conversation.begin}"/>
                          ...
                          </pages>



                          How many times will the above action method get called when the JSF and multiple forms in that JSF are submitted multiple times per conversation??