8 Replies Latest reply on Sep 3, 2009 10:34 PM by Julien Kronegg

    Mapping Date request params to component properties

    asaf sh Expert

      Hello,


      I have a simple class that inherits from 'EntityQuery',
      Im trying to add restrictions that are based on params of 'Date' type,



      Seems like it fails with a ClassCastException, it used to work in older versions of Seam (I currently use 2.1.0.SP1)




      Here's the full stack:


      14:54:02,226 WARN  [SeamPhaseListener] uncaught exception, passing to exception handler
      javax.el.ELException: java.lang.IllegalArgumentException: java.lang.ClassCastException@4af210
              at javax.el.BeanELResolver.setValue(BeanELResolver.java:116)
              at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
              at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
              at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
              at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
              at org.jboss.seam.core.Expressions$1.setValue(Expressions.java:117)
              at org.jboss.seam.navigation.Pages.applyConvertedValidatedValuesToModel(Pages.java:863)
              at org.jboss.seam.navigation.Pages.postRestore(Pages.java:462)
              at org.jboss.seam.jsf.SeamPhaseListener.postRestorePage(SeamPhaseListener.java:546)
              at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
              at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:228)
              at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:194)
              at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              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.web.IdentityFilter.doFilter(IdentityFilter.java:38)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
              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:157)
              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:619)
      Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4af210
              at sun.reflect.GeneratedMethodAccessor865.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
              ... 59 more
      





      Many thanks,



      Asaf.