You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Whitney Hunter (JIRA)" <in...@incubator.apache.org> on 2005/03/31 22:13:23 UTC

[jira] Created: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Null pointer exception in selectManyListbox when using converter
----------------------------------------------------------------

         Key: MYFACES-157
         URL: http://issues.apache.org/jira/browse/MYFACES-157
     Project: MyFaces
        Type: Bug
    Versions: 1.0.9 beta    
 Environment: Windows XP SP2
    Reporter: Whitney Hunter
    Priority: Critical


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)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "Whitney Hunter (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=comments#action_61913 ]
     
Whitney Hunter commented on MYFACES-157:
----------------------------------------

I guess I should have searched the existing bugs before entering this one. It is a duplicate of 149.

> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Priority: Critical
>  Attachments: _SharedRendererUtils.java, _SharedRendererUtils.java
>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "sean schofield (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=history ]
     
sean schofield resolved MYFACES-157:
------------------------------------

     Resolution: Fixed
    Fix Version: Nightly Build

Thanks to Whitney for the bug report (and fix.)

> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Priority: Critical
>      Fix For: Nightly Build

>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "Manfred Geiler (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=history ]
     
Manfred Geiler reopened MYFACES-157:
------------------------------------

     Assign To: Manfred Geiler

only one of the mentioned classes was fixed

> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Assignee: Manfred Geiler
>     Priority: Critical
>      Fix For: 1.0.9 beta

>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "Whitney Hunter (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=comments#action_62274 ]
     
Whitney Hunter commented on MYFACES-157:
----------------------------------------

As of 1.0.9rc3 only one of the two files was patched correctly:

    javax.faces.component._sharedRendererUtil           (correctly patched)
    org.apache.myfaces.renderkit._sharedRendererUtil    (not patched)


> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Priority: Critical
>      Fix For: Nightly Build

>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "Whitney Hunter (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=history ]

Whitney Hunter updated MYFACES-157:
-----------------------------------

    Attachment: _SharedRendererUtils.java
                _SharedRendererUtils.java

It looks like the NullPointerException is being caused by the fact that the submittedValue parameter to getConvertedUISelectManyValue is null when no elements are selected the list box. This causes the call(s) to submittedValue.length() to hurl. I have patched the two _SharedRendererUtils classes to check for this condition.

> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Priority: Critical
>  Attachments: _SharedRendererUtils.java, _SharedRendererUtils.java
>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MYFACES-157) Null pointer exception in selectManyListbox when using converter

Posted by "Manfred Geiler (JIRA)" <in...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-157?page=history ]
     
Manfred Geiler resolved MYFACES-157:
------------------------------------

     Resolution: Duplicate
    Fix Version: 1.0.9 beta
                     (was: Nightly Build)

Duplicate of MYFACES-149, see comments there for details on the fix

> Null pointer exception in selectManyListbox when using converter
> ----------------------------------------------------------------
>
>          Key: MYFACES-157
>          URL: http://issues.apache.org/jira/browse/MYFACES-157
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP SP2
>     Reporter: Whitney Hunter
>     Assignee: Manfred Geiler
>     Priority: Critical
>      Fix For: 1.0.9 beta

>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira