0 Replies Latest reply on Mar 5, 2010 3:35 PM by Chris Werner

    Passing params with pages.xml results in No PropertyTypeExtractor available Exception

    Chris Werner Newbie

      Hi,


      I am trying to pass a parameter from the URL to my backing bean.


      This is what my pages.xml looks like:


      <pages login-view-id="/trylogin.xhtml" no-conversation-view-id="/home.xhtml" xmlns=....>
       <page view-id="/trylogin.xhtml" action="#{org.jboss.seam.security.identity.login()}">
        <param name="testy" value="#{viewController.testy}" /> 
        <navigation>
         <rule if="#{identity.isLoggedIn()}">
          <redirect view-id="/home.xhtml"/>
         </rule>
         <rule if="#{not identity.isLoggedIn()}">
          <redirect view-id="/nologin.xhtml"/>
         </rule>
        </navigation>
       </page>
      ...



      Unfortunatly the



      <param name="testy" value="#{viewController.testy}" />




      causes a java.lang.IllegalArgumentException




      java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void 
           at org.hibernate.reflection.java.JavaXFactory.toXType(JavaXFactory.java:305)
           at org.hibernate.reflection.java.JavaXProperty.create(JavaXProperty.java:45)
           at org.hibernate.reflection.java.JavaXFactory.getXProperty(JavaXFactory.java:258)
           at org.hibernate.reflection.java.JavaXClass.getDeclaredFieldProperties(JavaXClass.java:78)
           at org.hibernate.reflection.java.JavaXClass.getDeclaredProperties(JavaXClass.java:100)
           at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:219)
           at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:134)
           at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105)
           at org.jboss.seam.core.Validators.createValidator(Validators.java:122)
           at org.jboss.seam.core.Validators.getValidator(Validators.java:105)
           at org.jboss.seam.core.Validators.getValidator(Validators.java:88)
           at org.jboss.seam.core.Validators$ValidatingResolver.setValue(Validators.java:199)
           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.Validators.validate(Validators.java:140)
           at org.jboss.seam.navigation.Param.validateConvertedValue(Param.java:239)
           at org.jboss.seam.navigation.Pages.convertAndValidateStringValuesInPageContext(Pages.java:753)
           at org.jboss.seam.navigation.Pages.postRestore(Pages.java:400)
           at org.jboss.seam.jsf.SeamPhaseListener.postRestorePage(SeamPhaseListener.java:544)
           at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:390)
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:226)
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
           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.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:45)
           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: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:182)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           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:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:595)






      I have no idea how this tag can cause this exception and what hibernate validators has to do with it. After this exception is thrown the parameter 'testy' is correctly set in the viewController. But I have to add the @In annotation to the setter-Method or it won't be called.


      Can anybody help me on this?


      Thx, Chris