3 Replies Latest reply on Nov 21, 2007 10:26 AM by Olivier Thierry

    "No Converter for type java.util.Date" error

    Olivier Thierry Apprentice

      Hi,

      I made a form with a data table listing datas from a table. On each line there is a "delete" button. In the table footer, there is a form to add a new line to the table, all fields are required.

      The code is as following :

      <rich:dataTable id="unitesOrganisation" value="#{uniteOrganisationDetail.membres}" var="membre">
       <rich:column>
       <h:outputText value="#{membre.matricule}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{membre.dateDebut}" />
       </rich:column>
       <rich:column>
       <h:commandButton id="deleteMembre"
       action="#{uniteOrganisationDetail.supprimerMembre(membre)}"
       value="Delete"
       immediate="true" />
       </rich:column>
       <f:facet name="footer">
       <rich:columnGroup>
       <rich:column>
       <h:inputText value="#{uniteOrganisationDetail.nouveauMembre.matricule}" required="true" />
       </rich:column>
       <rich:column>
       <rich:calendar id="dateDebut"
       value="#{uniteOrganisationDetail.nouveauMembre.dateDebut}"
       datePattern="dd/MM/yyyy"
       popup="true"
       enableManualInput="true"
       required="true" />
       </rich:column>
       <rich:column>
       <h:commandButton id="addMembre"
       action="#{uniteOrganisationDetail.ajouterMembre}"
       value="Add" />
       </rich:column>
       </rich:columnGroup>
       </f:facet>
      </rich:dataTable>


      To make the delete button work, I have to set immediate="true" so that validation tests are not runned. But if I do this, I have an error when clicking on the button (the binded action returns void).

      Here is the stack trace :



      javax.faces.convert.ConverterException: No Converter for type java.util.Date found
       at org.ajax4jsf.util.SelectUtils.getConverterForProperty(SelectUtils.java:283)
       at org.richfaces.renderkit.CalendarRendererBase.getSelectedDate(CalendarRendererBase.java:365)
       at org.richfaces.renderkit.html.CalendarRenderer.doEncodeEnd(CalendarRenderer.java:225)
       at org.richfaces.renderkit.html.CalendarRenderer.doEncodeEnd(CalendarRenderer.java:436)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:283)
       at org.richfaces.renderkit.html.ColgroupRenderer.encodeChildren(ColgroupRenderer.java:98)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:283)
       at org.richfaces.renderkit.AbstractRowsRenderer.encodeTableHeaderFacet(AbstractRowsRenderer.java:305)
       at org.richfaces.renderkit.AbstractTableRenderer.encodeFooter(AbstractTableRenderer.java:182)
       at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:82)
       at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:139)
       at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:785)
       at javax.faces.component.UIData.encodeBegin(UIData.java:879)
       at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1041)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       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 org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
       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:44)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       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:156)
       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(Thread.java:595)
      


      Anyone has an idea of what it means ?

      Thanks in advance