Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-157

Null pointer exception in selectManyListbox when using converter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 1.0.9m9
    • 1.0.9m9
    • None
    • None
    • Windows XP SP2

    Description

      I believe that this is a new bug in 1.0.9. It seems to not exist in 1.0.8.

      When I have jsp code like this:

      <f:view>
      <h:form>
      <h:panelGrid columns="1">
      <h:selectManyListbox>
      <f:selectItem itemLabel="one" itemValue="one" />
      <f:selectItem itemLabel="two" itemValue="two" />
      <f:selectItem itemLabel="three" itemValue="three" />
      <f:converter converterId="converter" />
      </h:selectManyListbox>
      <h:commandButton value="submit"
      actionListener="#

      {controller.submit}

      " />
      </h:panelGrid>
      </h:form>
      </f:view>

      I get a NullPointerException when I submit the form without selecting anything in the list box (no problem when a selection is made).

      Here is the stack trace:

      java.lang.NullPointerException
      at org.apache.myfaces.renderkit._SharedRendererUtils.getConvertedUISelectManyValue(_SharedRendererUtils.java:151)
      at org.apache.myfaces.renderkit.RendererUtils.getConvertedUISelectManyValue(RendererUtils.java:792)
      at org.apache.myfaces.renderkit.html.HtmlListboxRendererBase.getConvertedValue(HtmlListboxRendererBase.java:143)
      at javax.faces.component.UISelectMany.getConvertedValue(UISelectMany.java:295)
      at javax.faces.component.UIInput.validate(UIInput.java:291)
      at javax.faces.component.UISelectMany.validate(UISelectMany.java:284)
      at javax.faces.component.UIInput.processValidators(UIInput.java:166)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:427)
      at javax.faces.component.UIForm.processValidators(UIForm.java:66)
      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:427)
      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:162)
      at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:208)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:92)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)

      Attachments

        Activity

          People

            manolito Manfred Geiler
            whitney Whitney Hunter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: