1 Reply Latest reply on Feb 18, 2008 7:54 AM by Pete Muir

    s:selectItems + a4j:support = NullPointerException

    Saeed Iqbal Novice

      I get a nullpointerexception when i move the select box back to the item that is "noSelectionLabel". When I select a valid entry inside the drop down, it works OK. But when we go back to resetting it by selecting the noSelectionLabel, it pops the following error.

      Is this a bug?

      <h:selectOneMenu id="actionSelected1" value="#{voiceMenus.actionSelected1}" >
       <a4j:support event="onchange" actionListener="#{voiceMenus.onDropdown1Change}" reRender="drop0"
       limitToList="true" ignoreDupResponses="true" ajaxSingle="true" />
       <s:selectItems var="s_items0" value="#{voiceMenus.action}" noSelectionLabel="[Select Step]" />
       </h:selectOneMenu>
      
       <a4j:outputPanel id="drop0" >
       <h:inputText value="#{voiceMenus.inputcustom1}" rendered="#{voiceMenus.iscustom1}"/>
       </a4j:outputPanel>



      stack trace is as follows

      javax.servlet.ServletException: /VoiceMenus.xhtml @177,68 actionListener="#{voiceMenus.onDropdown1Change}": javax.ejb.EJBTransactionRolledbackException
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       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.j
      
      
      
      Caused by: javax.faces.el.EvaluationException: /VoiceMenus.xhtml @177,68 actionListener="#{voiceMenus.onDropdown1Change}": javax.ejb.EJBTransactionRolledbackException
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
       at javax.faces.component.UICommand.broadcast(UICommand.java:376)
       at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:61)
       at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
       at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
       at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
       at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       ... 37 more
      Caused by: javax.ejb.EJBTransactionRolledbackException
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      
      
      
      
      Caused by: java.lang.NullPointerException
       at com.iphonica.iattendant.portal.VoiceMenusBean.onDropdown1Change(VoiceMenusBean.java:787)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
       at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
       at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)