11 Replies Latest reply on Nov 14, 2006 7:57 AM by Pete Muir

    Trinidad example uploaded to wiki

    Carsten Hoehne Master

      Hello,
      i modified the ADF registration example on the wiki to use trinidad.
      This example uses selfcompiled (19.11.2006) librarys for trinidad.
      You can find this new example in the EXAMPLE section of the wiki.

      As of today, trinidad does not support opera as browser:-(
      but firefox works.
      Ciao,
      Carsten

        • 1. Re: Trinidad example uploaded to wiki
          Pawel Kaczor Newbie

          Thank you for the example. But I still can't work with trinidad. My command buttons just don't post the form!

          <tr:commandButton text="Register" action="#{someAction}"/>
          is rendered to something like this:
          <button type="button" onclick="submitForm(somethinghere)>Register</button>


          If I provide attribute type="submit" for the commandButton the warning is shown:

          type="submit" Property 'type' is not on type: org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton


          How it is possible that you are using this attribute in your example?

          Greetings
          Pawel Kaczor

          • 2. Re: Trinidad example uploaded to wiki
            Carsten Hoehne Master

            Hello,
            the uploaded trinidad example is just the adf example (also found at the wiki) converted to trinidad. I must state that i am not the author of the adf example.

            The uploaded example works for me on JBoss AS 4.0.4GA and on JBoss 4.0.5GA
            Yes, the mentioned warning is rendered, but the button works (in Firefox 2.0RC3 and in IE6)
            The button does not work with opera 9.02. I have filed an issue to the trinidad issue tracker about that.

            As of now, i renamed the example to registrationtrinidad and i will put in the official snapshot librarys of trinidad.
            And i plan to use the newest registration example of seam as a template. After this is done i reupload the example.

            Could you tell us, which browser you are using and to which browser you are deploying?

            Ciao,
            Carsten

            • 3. Re: Trinidad example uploaded to wiki
              Pawel Kaczor Newbie

              I tried both Opera 9.02 and IE6 on WinXP SP2.

              Thanks.
              Pawel Kaczor

              • 4. Re: Trinidad example uploaded to wiki
                Bob Brown Newbie

                Just tried this with Beta2 and jboss4.0.5ga.

                All is great when valid input is presented to the "Register New User" form.

                If, however just a single character is entered into each field, hibernate validation cuts in (good) and the browser is shown an error 500 (bad), thus:

                HTTP Status 500 -
                
                --------------------------------------------------------------------------------
                
                type Exception report
                
                message
                
                description The server encountered an internal error () that prevented it from fulfilling this request.
                
                exception
                
                javax.servlet.ServletException: Error calling action method of component with id submitButton
                 javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
                 org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
                 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                
                
                root cause
                
                javax.faces.FacesException: Error calling action method of component with id submitButton
                 org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                 org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:139)
                 javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                 javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                 org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                 org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                 javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
                 org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
                 org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
                 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                
                
                note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
                


                The jboss log is:

                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.manager
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.core.Manager] No stored conversation, or concurrent call to the stored conversation
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(3)
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: register
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.Component] instantiating Seam component: register
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                
                2006-11-12 13:46:39,198 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,214 DEBUG [org.jboss.seam.Component] initializing new instance of: register
                
                2006-11-12 13:46:39,230 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: user
                
                2006-11-12 13:46:39,230 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4764889904046080
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.SQL] select user0_.username as col_0_0_ from users user0_ where user0_.username=?
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() a -> username [1]
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections
                
                2006-11-12 13:46:39,230 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: a, using strategy: org.hibernate.id.Assigned
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.Component] instantiating Seam component: interpolator
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.Component] initializing new instance of: interpolator
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: expressions
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
                
                2006-11-12 13:46:39,245 INFO [org.jboss.seam.example.registration.RegisterAction] Registered new user a
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] dirty checking collections
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.pretty.Printer] listing entities:
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.pretty.Printer] org.jboss.seam.example.registration.User{password=a, username=a, name=a}
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
                
                2006-11-12 13:46:39,245 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] mark transaction for rollback
                
                2006-11-12 13:46:39,245 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
                
                2006-11-12 13:46:39,245 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-registrationtrinidad].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                
                javax.faces.FacesException: Error calling action method of component with id submitButton
                
                 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                
                 at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:139)
                
                 at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                
                 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                
                 at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                
                 at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
                
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
                
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
                
                 at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
                
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                
                 at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                
                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                
                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                
                 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                
                 at java.lang.Thread.run(Thread.java:595)
                
                Caused by: javax.faces.el.EvaluationException: /register.xhtml @35,103 action="#{register.register}": java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Grendel/18, BranchQual=, localId=18] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceException: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User)
                
                 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                
                 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                
                 ... 31 more
                
                Caused by: java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Grendel/18, BranchQual=, localId=18] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceException: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User)
                
                 at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
                
                 at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
                
                 at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                
                 at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                
                 at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                
                 at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
                
                 at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
                
                 at $Proxy107.register(Unknown Source)
                
                 at org.jboss.seam.example.registration.Register$$FastClassByCGLIB$$46e07125.invoke(<generated>)
                
                 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
                
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
                
                 at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:68)
                
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
                
                 at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
                
                 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:585)
                
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
                
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
                
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
                
                 at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
                
                 at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
                
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
                
                 at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:77)
                
                 at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
                
                 at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$a4e97aff.register(<generated>)
                
                 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:585)
                
                 at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
                
                 at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
                
                 at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                
                 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
                
                 ... 32 more
                
                Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Grendel/18, BranchQual=, localId=18] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceException: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User)
                
                 at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
                
                 at org.jboss.tm.TxManager.commit(TxManager.java:240)
                
                 at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
                
                 ... 76 more
                
                Caused by: javax.persistence.PersistenceException: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User
                
                 at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:527)
                
                 at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
                
                 at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
                
                 at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
                
                 ... 78 more
                
                Caused by: org.hibernate.validator.InvalidStateException: validation failed for: org.jboss.seam.example.registration.User
                
                 at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:104)
                
                 at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:127)
                
                 at org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:139)
                
                 at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:44)
                
                 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
                
                 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
                
                 at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
                
                 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.impl.SessionImpl.managedFlush(SessionImpl.java:338)
                
                 at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
                
                 ... 81 more
                


                Any suggestions as to how to overcome this are welcomed...

                I tried adding the following to web.xml, but to no effect:

                <filter>
                 <filter-name>Seam Exception Filter</filter-name>
                 <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
                </filter>
                <filter-mapping>
                 <filter-name>Seam Exception Filter</filter-name>
                 <url-pattern>*.jsf</url-pattern>
                </filter-mapping>
                <filter-mapping>
                 <filter-name>Seam Exception Filter</filter-name>
                 <url-pattern>*.seam</url-pattern>
                </filter-mapping>
                


                Cheers,

                Alph

                • 5. Re: Trinidad example uploaded to wiki
                  Gavin King Master

                  This is because validation is failing in the Hibernate layer, instead of the Seam layer. You need the constraints to be enforced by <s:validate/>.

                  • 6. Re: Trinidad example uploaded to wiki
                    Bob Brown Newbie

                    Thanks, Gavin.

                    I modified the inputText tags in 'register.xhtml' as follows.

                    From:

                    <table border="0">
                     <s:validateAll>
                     ...
                     <tr>
                     <td>Password</td>
                     <td><tr:inputText value="#{user.password}" secret="true"
                     required="true"
                     requiredMessageDetail="Must enter a password" />td>
                     </tr>
                     </s:validateAll>
                     </table>
                    


                    To:

                    <table border="0">
                     ...
                     <tr>
                     <td>Password</td>
                     <td><tr:inputText value="#{user.password}" secret="true"
                     required="true"
                     requiredMessageDetail="Must enter a password">
                     <s:validate />
                     </tr:inputText></td>
                     </tr>
                     </table>
                    


                    This works as expected (many thanks).

                    It leaves me a bit puzzled, however...the doco says that <s:validateAll> "...simply adds an <s:validate> to every input in the form. " The doco seems to "lead one away" from using <s:validate>.

                    Is Tridindad forcing special handling (or what...)? Could you clarify for me, please.

                    Cheers,

                    Alph

                    • 7. Re: Trinidad example uploaded to wiki
                      Gavin King Master

                      Actually <s:validateAll/> adds an <s:validate/> to every instance of UIInput in the tree. If the trinidad inputText is not a UIInput, then it will be missed.

                      • 8. Re: Trinidad example uploaded to wiki
                        Bob Brown Newbie

                        Understood...thanks Gavin. I believe that <tr:input* /> are UIComponents.

                        The feeling I get here is: "only use standard JSF for form components/validation."

                        Maybe something should go in the doco regarding this, especially since Trinidad is now mentioned explicitly (ch 16):


                        "Seam includes a number of JSF controls that are useful for working with Seam. These are intended to complement the built-in JSF controls, and controls from other third-party libraries. We recommend the Ajax4JSF and ADF faces (now Trinidad) tag libraries for use with Seam. We do not recommend the use of the Tomahawk tag library."


                        Sorry for being such a nag.

                        Cheers,

                        Alph

                        • 9. Re: Trinidad example uploaded to wiki
                          Pete Muir Master

                          Atm you can't use s:validateAll with trinidad.

                          s:validateAll iterates over all it's children looking for instances of UIInput (which superclasess all input components) - which normally works.

                          However Trinidad uses the custom UIXInput as it's superclass for all input components, so s:validateAll doesn't attach a validator. Using s:validate on each input component will work (but is a drag).

                          I believe this is a bug in Trinidad rather than Seam and looking at their JIRA they are intending to eventually move over to a JSF standard inheritance.

                          • 10. Re: Trinidad example uploaded to wiki
                            Gavin King Master

                            If someone tells me exactly what is the name of their UIInput class, I can workaround this problem in Seam ;-)

                            • 11. Re: Trinidad example uploaded to wiki
                              Pete Muir Master

                              org.apache.myfaces.trinidad.component.UIXInput