3 Replies Latest reply on Nov 30, 2007 8:05 AM by virgulino ferreira

    Seam 2.0.0.GA + Maven2 (s:validateAll doesn't work)

    virgulino ferreira Newbie

      Excuse my very bad english but it isn't my native languange.

      I'm trying integrate Maven2 and Seam 2.0.0.GA to run in JBoss AS 4.2.2.GA It's working fine, but s:validateAll don't work. Below is my form.xhtml.


      
      <s:validateAll>
       <f:facet name="afterInvalidField">
       <s:span styleClass="error">
       <s:message showDetail="true" showSummary="false" />
       </s:span>
       </f:facet>
      
       <div>Name:
       <s:decorate>
       <h:inputText value="#{person.name}" />
       </s:decorate>
       </div>
      
       <h:commandButton actionListener="#{person.save}"/>
      </s:validateAll>
      
      


      and in my java code I annoted the property.
       @Length(min=3)
       public String getName()
      


      When I submit the form, Seam update the model with no validate it, and the DAO throws InvalidStateException.

      It's dificult for me because I'm a new Seam user.
      Anybody can help me?

        • 1. Re: Seam 2.0.0.GA + Maven2 (s:validateAll doesn't work)
          virgulino ferreira Newbie

          Hi, I have more informations...

          I saw in the JBoss logs this message when I load a page.

          14:28:32,756 INFO [Pages] no pages.xml file found: /WEB-INF/pages.xml
          14:28:33,377 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jboss-seam-ui-2.0.0.GA.jar!/META-INF/s.taglib.xml
          14:28:33,462 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-core.taglib.xml
          14:28:33,471 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-html.taglib.xml
          14:28:33,504 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jsf-ui.taglib.xml
          14:28:33,559 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-core.taglib.xml
          14:28:33,567 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
          14:28:33,614 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/a4j.taglib.xml
          14:28:33,622 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/ajax4jsf.taglib.xml
          14:28:33,722 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/rich.taglib.xml
          14:28:33,772 ERROR [STDERR] 29/11/2007 14:28:33 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp44574spiv.ear-contents/spiv-war-exp.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/richfaces.taglib.xml
          

          after this message, when I execute the form submit, the Seam throws this exception:
          javax.servlet.ServletException: Servlet execution threw an exception
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           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:44)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          root cause
          
          java.lang.AbstractMethodError: org.hibernate.validator.InvalidValue.getMessage()Ljava/lang/String;
           org.jboss.seam.ui.validator.ModelValidator.createMessage(ModelValidator.java:53)
           org.jboss.seam.ui.validator.ModelValidator.validate(ModelValidator.java:46)
           javax.faces.component.UIInput.validateValue(UIInput.java:1013)
           javax.faces.component.UIInput.validate(UIInput.java:867)
           javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
           javax.faces.component.UIInput.processValidators(UIInput.java:666)
           javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
           javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
           javax.faces.component.UIForm.processValidators(UIForm.java:229)
           javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
           javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
           org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
           org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
           org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
           org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
           org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
           com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
           com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           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:44)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          


          Can you help me?

          • 2. Re: Seam 2.0.0.GA + Maven2 (s:validateAll doesn't work)
            Craig Savolainen Newbie

            What version of hibernate-commons-annotations and hibernate-validator are you including in your project?

            • 3. Re: Seam 2.0.0.GA + Maven2 (s:validateAll doesn't work)
              virgulino ferreira Newbie

              Ok, that is it. I was using a older version hibernate. I update to the last version and it's ok.

              Thank you.