You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Paul Spencer <pa...@apache.org> on 2007/04/09 21:37:53 UTC

java.lang.IllegalArgumentException when value of is null

I am receiving "java.lang.IllegalArgumentException: Value is no String..." when the value associated with a <t:selectOneRadio>  is null.

2007-04-09 15:18:10,265 ERROR [http-8080-Processor25] org.apache.catalina.core.ApplicationDispatcher invoke 723 - Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: Value is no String (class=org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils$1, value=org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils$1@16bd187) and component productionComparisonTab:productionComparisonForm:summariseBywith path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /barton.jsp][Class: org.apache.myfaces.custom.document.Document,Id: _idJsp0][Class: org.apache.myfaces.custom.document.DocumentBody,Id: _idJsp9][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane,Id: queryFormTabs][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTab,Id: productionComparisonTab][Class: javax.faces.component.html.HtmlForm,Id: 
productionComparisonForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp100][Class: javax.faces.component.html.HtmlPanelGroup,Id: _idJsp110][Class: org.apache.myfaces.component.html.ext.HtmlSelectOneRadio,Id: summariseBy]} does not have a Converter
	at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:513)
	at org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.renderRadio(HtmlRadioRenderer.java:124)
	at org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.encodeEnd(HtmlRadioRenderer.java:59)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
	at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
	at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
	at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)

This started appearing between the Tomahawk 1.1.4-SNAPSHOT and the staged Tomahawk 1.1.5, probably by revision 380924.  That is when
the following was introduced:
         currentValue
             = RendererUtils.getConvertedStringValue(facesContext, uiSelectOne,
                                                     converter, currentValue);

Should this line be protected by a <code> if (currentValue != null){...} </code>?

Paul Spencer