1 Reply Latest reply on Aug 26, 2010 4:25 PM by Rocky S

    Annoying and Time Feeder DateTimeConverter bug in Seam-

    Rocky S Master
      <a:form>
                                         <rich:calendar
                                         value="#{generalLedgerFormatFeed.postedDate}"
                                         valueChangeListener="#{generalLedgerFormatFeed.valueChangeListenerPostDate}"
                                         currentDateChangeListener="#{generalLedgerFormatFeed.valueChangeListenerPostDate}" reRender="hey">
                                         <s:convertDateTime type="date"/>
                                    </rich:calendar>
      
                <a:commandButton name="testJoin" value="#{generalLedgerFormatFeed.getGlintfExtractList()}">
                <f:param name="postedDate" value="#{generalLedgerFormatFeed.postedDate}"/>
                </a:commandButton>
                <h:outputText value="#{currentDatetime}"/>
                <h:outputText id="hey" value="#{generalLedgerFormatFeed.postedDate}"/>
      </a:form>
      


      If you use the above snippet code and press commandButton, you will receive the following exception which do not offer much clue to you...


      Caused by java.lang.IllegalArgumentException with message: "no converter for type: class java.util.Date" 
      org.jboss.seam.faces.Parameters.convertRequestParameter(Parameters.java:45)
      org.jboss.seam.web.Parameters.convertMultiValueRequestParameter(Parameters.java:74)
      org.jboss.seam.Component.injectParameters(Component.java:1546)
      org.jboss.seam.Component.inject(Component.java:1513)
      org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      com.fhlbny.cashrecon.file.GeneralLedgerFormatFeed_$$_javassist_3.getPostedDate(GeneralLedgerFormatFeed_$$_javassist_3.java)
      sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
      javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
      org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
      org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      javax.faces.component.UIOutput.getValue(UIOutput.java:184)
      javax.faces.component.UIInput.validate(UIInput.java:880)
      javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
      javax.faces.component.UIInput.processValidators(UIInput.java:672)
      org.ajax4jsf.component.UIAjaxForm.processValidators(UIAjaxForm.java:80)
      org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
      org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
      com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Unknown Source)
      

        • 1. Re: Annoying and Time Feeder DateTimeConverter bug in Seam-
          Rocky S Master

          The above exception comes even if you have used datetime converter in your page.xml


          In above code, I did following change-


               <a:commandButton name="testJoin" value="#{generalLedgerFormatFeed.getGlintfExtractList()}">
                    <f:param name="postedDate" value="#{generalLedgerFormatFeed.postedDate}"/>
                    </a:commandButton>
          



          changed to


                    <h:commandButton name="testJoin" value="#{generalLedgerFormatFeed.getGlintfExtractList()}">
                    <f:param name="postedDate" value="#{generalLedgerFormatFeed.postedDate}"/>
                    </h:commandButton>
          



          It started working. I do not understand why this small change cause such a big problem?