9 Replies Latest reply on Jun 22, 2007 12:03 PM by Mihai Anescu

    Validation throws an exception instead of redisplaying the p

    Beaudoin Gaël Newbie

      Here is the page :

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       template="../layout/template.xhtml">
      
      <ui:define name="body">
      
       <h:messages styleClass="message"/>
      
       <ui:include src="usersMenu.xhtml"/>
      
       <h:form>
      
       <s:validateAll>
      
       <f:facet name="aroundInvalidField">
       <s:span styleClass="errors"/>
       </f:facet>
       <f:facet name="afterInvalidField">
       <s:span> <s:message/></s:span>
       </f:facet>
      
       <s:decorate>#{messages['lrb.user.id']} <h:inputText id="id" value="#{user.id}"/></s:decorate><br/>
       <s:decorate>#{messages['lrb.user.username']} <h:inputText id="username" value="#{user.username}"/></s:decorate><br/>
       <s:decorate>#{messages['lrb.user.password']} <h:inputText id="password" value="#{user.password}"/></s:decorate><br/>
       <s:decorate>#{messages['lrb.user.email']} <h:inputText id="email" value="#{user.email}"/></s:decorate>
      
       </s:validateAll>
      
       <!-- actions -->
       <div class="actionButtons">
      
       <s:link view="/admin/users.xhtml" value="#{messages['lrb.cancel']}"/>
       <h:outputText value=" "/>
       <h:commandLink action="#{userHome.update}" value="#{messages['lrb.update']}" rendered="#{userHome.managed}"/>
       <h:outputText value=" "/>
       <s:link action="#{userHome.remove}" value="#{messages['lrb.delete']}" rendered="#{userHome.managed}"/>
       <h:outputText value=" "/>
       <h:commandLink action="#{userHome.persist}" value="#{messages['lrb.create']}" rendered="#{!userHome.managed}"/>
      
       </div>
       </h:form>
      
       </ui:define>
      </ui:composition>


      the entity in components.xml :
      <factory name="user" value="#{userHome.instance}"/>
       <fwk:entity-home name="userHome"
       entity-class="com.lrb.metabook.User"
       new-instance="#{newUser}"/>
      
       <component name="newUser" class="com.lrb.metabook.User"/>
      
       <fwk:entity-query name="users"
       max-results="5">
       <fwk:ejbql>from User</fwk:ejbql>
       <fwk:order>id</fwk:order>
       </fwk:entity-query>


      The thing is that if I add required="true" to each h:inputText, it works as expected, but do not follow annotated validation.

      Here is the entity bean :

      package com.lrb.metabook;
      
      // Generated 10 juin 2007 20:21:17 by Hibernate Tools 3.2.0.b9
      
      import java.util.Iterator;
      
      /**
       * User generated by hbm2java
       */
      @Entity
      public class User implements java.io.Serializable {
      
       private long id;
      
       private String password;
      
       private String username;
      
       private List<Role> roles;
      
       private String email;
      
       public User() {
       }
      
       public User(long id, String password, String username) {
       this.id = id;
       this.password = password;
       this.username = username;
       }
      
       @Id
       @GeneratedValue
       public long getId() {
       return this.id;
       }
      
       public void setId(long id) {
       this.id = id;
       }
      
       @NotNull
       @Length(min = 1, max = 20)
       public String getPassword() {
       return this.password;
       }
      
       public void setPassword(String password) {
       this.password = password;
       }
      
       @NotNull
       @Length(min = 1, max = 20)
       public String getUsername() {
       return this.username;
       }
      
       public void setUsername(String username) {
       this.username = username;
       }
      
       @ManyToMany
       public List<Role> getRoles() {
       return roles;
       }
      
       private void setRoles(List<Role> roles) {
       this.roles = roles;
       }
      
       /**
       * @return roles list
       */
       public String rolesList() {
      
       if (roles != null) {
       StringBuffer sb = new StringBuffer();
       for (Iterator iter = roles.iterator(); iter.hasNext();) {
       Role role = (Role) iter.next();
       sb.append(role.getName() + " ");
       }
       return sb.toString();
       }
       return "";
       }
      
       @NotNull
       @Email
       public String getEmail() {
       return email;
       }
      
       public void setEmail(String email) {
       this.email = email;
       }
      
      }
      


      I'm using seam 1.3.0ALPHA

      Any idea ?

        • 1. Re: Validation throws an exception instead of redisplaying t
          Gavin King Master

          Huh? What is the problem? You mention an exception .... then where is the stack trace?

          • 2. Re: Validation throws an exception instead of redisplaying t
            Beaudoin Gaël Newbie

            bah ... :S here it is :

            17:02:59,339 FATAL [application] org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
            javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)
            Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             ... 47 more
            17:02:59,350 WARN [lifecycle] #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
            javax.faces.FacesException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)
            Caused by: javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             ... 46 more
            Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             ... 47 more
            17:02:59,363 WARN [lifecycle] executePhase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@8c1143) threw exception
            javax.faces.FacesException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:105)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)
            Caused by: javax.faces.FacesException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             ... 41 more
            Caused by: javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             ... 46 more
            Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             ... 47 more
            17:02:59,378 ERROR [ExceptionFilter] uncaught exception
            javax.servlet.ServletException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)
            Caused by: javax.faces.FacesException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             ... 38 more
            Caused by: javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             ... 46 more
            Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             ... 47 more
            17:02:59,397 ERROR [ExceptionFilter] exception root cause
            javax.faces.FacesException: #{userHome.persist}: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)
            Caused by: javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             ... 46 more
            Caused by: org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             ... 47 more
            17:02:59,442 ERROR [DebugPageHandler] redirecting to debug page
            org.hibernate.validator.InvalidStateException: validation failed for: com.lrb.metabook.User
             at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
             at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
             at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:119)
             at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:42)
             at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
             at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
             at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
             at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
             at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
             at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
             at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
             at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
             at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
             at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:128)
             at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:48)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:33)
             at org.jboss.seam.util.Work.workInTransaction(Work.java:38)
             at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:28)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.framework.EntityHome_$$_javassist_18.persist(EntityHome_$$_javassist_18.java)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
             at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
             at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
             at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
             at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
             at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
             at javax.faces.component.UICommand.broadcast(UICommand.java:383)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
             at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
             at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
             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:619)


            • 3. Re: Validation throws an exception instead of redisplaying t
              Gavin King Master

              So put a breakpoint at org.hibernate.validator.event.ValidateEventListener.validate() and see what is the cause of the validation failure.

              • 4. Re: Validation throws an exception instead of redisplaying t
                Beaudoin Gaël Newbie

                I've never done that with a seam application ... do you have any help about how I can setup that ?

                The app has been generated by seam-gen and I'm using eclipse, It shouldn't be too hard ...

                • 5. Re: Validation throws an exception instead of redisplaying t
                  Gavin King Master

                  Put the HV source in your sourcepath. Add a breakpoint. Debug the server.

                  • 6. Re: Validation throws an exception instead of redisplaying t
                    Pete Muir Master

                    You've probably got the problem described here:

                    http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ regard @NotNull, @Length etc.

                    • 7. Re: Validation throws an exception instead of redisplaying t
                      Beaudoin Gaël Newbie

                      I've managed to debug it but I don't know where and what it fails. Moreover I miss some sources.
                      Anyway, here is my whole test application : http://beta.livre-rare-book.net/metadebug.tar.bz2

                      I've not included the lib dir as it's the one from seam 1.3.0.ALPHA.

                      The app uses DefaultDS

                      Step to reproduce :
                      - just deploy the app
                      - login
                      - go to admin (top-right)
                      - click to users (there must be two)
                      - click on new
                      - valid without filling in the form by clicking on create

                      => no validation, but the above exception.

                      pete.muir > I'll test tomorrow to see if then the validation occur when adding required=true or if it just avoid empty fields.

                      Thanks for your help :)

                      • 8. Re: Validation throws an exception instead of redisplaying t
                        Mihai Anescu Newbie

                         

                        "pete.muir@jboss.org" wrote:
                        You've probably got the problem described here:

                        http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ regard @NotNull, @Length etc.



                        Hi,

                        I have the same problem with an @Email annotated field.
                        The problem is that the field can allow null values (so no @NotNull, the field is nullable in the DB). It throws the same error as this thread describes. I looked into the EmailValidator and for a null/empty string it shoul be a valid email. And still I get the InvalidStateException...

                        public boolean isValid(Object value) {
                         if ( value == null ) return true;
                         if ( !( value instanceof String ) ) return false;
                         String string = (String) value;
                         if ( string.length() == 0 ) return true;
                         Matcher m = pattern.matcher( string );
                         return m.matches();
                         }


                        I also have the same problem with a field marked with @Pattern. If the field is empty (and also is not required), when the page is saved I get to the debug page with a stacktrace and again the cause is InvalidStateException

                        I looked into the Pattern isValid method from SVN and it doesn't check if the field is of length 0 ( aka '' - empty string).



                        • 9. Re: Validation throws an exception instead of redisplaying t
                          Mihai Anescu Newbie

                          I looked into the EmailValidator class supplied with Seam 1.2.1, and its different from that found in SVN. So I found the culprit, it doesn't consider valid a String with value ''. And apparently this is the value that gets saved into the bean:

                          Java code in Home.update():

                          System.out.println( "###Email: '" + getInstance().getContact().getEmail()+ "'" );
                           System.out.println( "###Email validator: '" + eVal.isValid( getInstance().getContact().getEmail() )+ "'" );


                          And in the log:

                          2007-06-22 18:57:47,549 INFO [STDOUT] ###Email: ''
                          2007-06-22 18:57:47,549 INFO [STDOUT] ###Email validator: 'false'


                          The vestion in SVN treats that case as well.
                          I'm also eager to find when the similar problem in the PatternValidator will be solved.