[jboss-user] [JBoss Seam] - Trinidad: Validation still not working

stephen.friedrich do-not-reply at jboss.com
Mon Aug 6 17:57:07 EDT 2007


I haven't been able to get s:validateAll to work with tr:inputText
(JBoss Seam CVS, Trinidad 1.2.1, JBOss AS 4.2.1)
The bug can be reproduced with seamdiscs example, when adding @Length(min=3, max=32) to Disc.name declaration.

When trying to add a short or longer name the following exception occurs:

Additionally the error handling fails: A 404 is displayed with this URL: http://127.0.0.1:8080/seam-discs/disc.seam/error.xhtml?cid=6

I noticed that http://jira.jboss.com/jira/browse/JBSEAM-501 is fixed and indeed when I debug I see that in ValidateAllRendererBase.addValidators() in fact there is a validator added to the trinidad input component.

Any idea why this is not working?

23:48:05,281 FATAL [application] org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.seamdiscs.model.Disc
  | javax.faces.el.EvaluationException: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.seamdiscs.model.Disc
  | 	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.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
  | 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
  | 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
  | 	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
  | 	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
  | 	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
  | 	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.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: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.seamdiscs.model.Disc
  | 	at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
  | 	at org.hibernate.validator.event.ValidateEventListener.onPreUpdate(ValidateEventListener.java:172)
  | 	at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:217)
  | 	at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:65)
  | 	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
  | 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
  | 	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
  | 	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
  | 	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  | 	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
  | 	at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:296)
  | 	at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:90)
  | 	at org.jboss.seam.framework.EntityHome.update(EntityHome.java:41)
  | 	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:56)
  | 	at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:45)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
  | 	at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
  | 	at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
  | 	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_2.update(EntityHome_$$_javassist_2.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:328)
  | 	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
  | 	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)
  | 	... 49 more
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071383#4071383

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071383



More information about the jboss-user mailing list