10 Replies Latest reply on May 31, 2007 4:21 AM by Chris Lowe

    Seam CVS+JBoss 4.2+Trinidad

    Brian Smith Apprentice

      I am having some problems getting Trinidad working with a SeamGen created project (Seam CVS) and JBoss 4.2

      This used to work with Seam 1.2.1GA and JBoss 4.0.4 and MyFaces.

      Every time I open a Trinidad page I get this stack trace. It has something to do with the A4J Filter. I am not using Ajax4JSF in my project, it was just included with SeamGen.

      2007-05-29 16:36:50,955 INFO [org.jboss.seam.init.Initialization] done initializing Seam
      2007-05-29 16:36:50,965 DEBUG [org.jboss.web.tomcat.filters.ReplyHeaderFilter] Adding header name: X-Powered-By='Servlet 2.4; JBoss-4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)/Tomcat-5.5'
      2007-05-29 16:36:50,965 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Init ajax4jsf filter with nane: ajax4jsf
      2007-05-29 16:36:50,965 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Init parameters :
      forceparser : 'false
      
      2007-05-29 16:36:50,965 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Stack Trace
      java.lang.Exception
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.init(BaseFilter.java:118)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
       at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3720)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4365)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
       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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
       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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy45.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy46.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
       at org.jboss.Main.boot(Main.java:200)
       at org.jboss.Main$1.run(Main.java:508)
       at java.lang.Thread.run(Thread.java:595)


      Here is my web.xml

      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">
      
       <!-- Ajax4jsf (must come first!) -->
      
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
       </init-param>
       </filter>
      
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <url-pattern>*.seam</url-pattern>
       </filter-mapping>
      
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
      
       <!--****************Trinidad Filter*****************-->
       <filter>
       <filter-name>Trinidad</filter-name>
       <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>Trinidad</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.seam</url-pattern>
       </filter-mapping>
       <!--****************Trinidad Resources Servlet**********-->
       <servlet>
       <servlet-name>Trinidad Resources</servlet-name>
       <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>Trinidad Resources</servlet-name>
       <url-pattern>/adf/*</url-pattern>
       </servlet-mapping>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
       <!--<param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>-->
       </context-param>
      
       <context-param>
       <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
       <param-value>false</param-value>
       </context-param>
      
       <!-- Seam -->
      
       <context-param>
       <param-name>org.jboss.seam.core.init.debug</param-name>
       <param-value>true</param-value>
       </context-param>
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <!-- Facelets development mode (disable in production) -->
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
       </context-param>
       <!-- JSF -->
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.seam</url-pattern>
       </servlet-mapping>
      
       <security-constraint>
       <display-name>Restrict raw XHTML Documents</display-name>
       <web-resource-collection>
       <web-resource-name>XHTML</web-resource-name>
       <url-pattern>*.xhtml</url-pattern>
       </web-resource-collection>
       <auth-constraint>
       <role-name>NONE</role-name>
       </auth-constraint>
       </security-constraint>
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>
       <resource-ref>
       <res-ref-name>jdbc/TXOracleDS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
      </web-app>
      


        • 1. Re: Seam CVS+JBoss 4.2+Trinidad
          Chris Lowe Apprentice

          I'm using latest CVS Seam with Trinidad, Facelets 1.12 and Ajax4Jsf without getting the exception you're seeing. Set up your Ajax4Jsf filter mapping as follows:

          <filter-mapping>
           <filter-name>ajax4jsf</filter-name>
           <servlet-name>Faces Servlet</servlet-name>
           <dispatcher>REQUEST</dispatcher>
           <dispatcher>FORWARD</dispatcher>
           <dispatcher>INCLUDE</dispatcher>
           </filter-mapping>


          Does that make any difference?

          • 2. Re: Seam CVS+JBoss 4.2+Trinidad
            Brian Smith Apprentice

            Thanks for your reply, unfortunately no luck. I have looked at the SeamDiscs example in CVS which uses Trinidad. It looks from it that the A4J filter is no longer required in web.xml.

            I have followed the SeamDiscs example very closely still to no avail. No matter what I try, I still get the above error when trying to access a page with Trinidad Components. Pages without Trinidad (the sample "home" page) load fine. I am sure it is something simple that I am overlooking.

            • 3. Re: Seam CVS+JBoss 4.2+Trinidad
              Brian Smith Apprentice

              Here is the current version of web.xml modeled after SeamDiscs example....... Still same error

              <?xml version="1.0" ?>
              <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
               version="2.4">
              
               <!-- Ajax4jsf (must come first!) -->
              
               <!-- Don't need Ajax4JSF Filter because seam filter installs it for me-->
               <!--
               Not used because of Trinidad
               <context-param>
               <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
               <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
               </context-param>
               -->
               <context-param>
               <param-name>org.ajax4jsf.SKIN</param-name>
               <param-value>blueSky</param-value>
               </context-param>
              
               <!-- Seam -->
              
               <!--
               <context-param>
               <param-name>org.jboss.seam.core.init.debug</param-name>
               <param-value>true</param-value>
               </context-param>
               -->
               <listener>
               <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
              
               <filter>
               <filter-name>Seam Filter</filter-name>
               <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
               </filter>
              
               <filter-mapping>
               <filter-name>Seam Filter</filter-name>
               <url-pattern>/*</url-pattern>
               </filter-mapping>
              
               <servlet>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
               </servlet>
              
               <servlet-mapping>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>
              
              
               <listener>
               <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
               </listener>
              
               <!-- Facelets development mode (disable in production) -->
              
               <context-param>
               <param-name>facelets.DEVELOPMENT</param-name>
               <param-value>true</param-value>
               </context-param>
               <context-param>
               <param-name>facelets.SKIP_COMMENTS</param-name>
               <param-value>true</param-value>
               </context-param>
               <!-- JSF -->
              
               <context-param>
               <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
               <param-value>client</param-value>
               </context-param>
              
               <context-param>
               <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
               <param-value>.xhtml</param-value>
               </context-param>
              
               <servlet>
               <servlet-name>Faces Servlet</servlet-name>
               <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
               <load-on-startup>1</load-on-startup>
               </servlet>
              
               <servlet-mapping>
               <servlet-name>Faces Servlet</servlet-name>
               <url-pattern>*.seam</url-pattern>
               </servlet-mapping>
              
               <security-constraint>
               <display-name>Restrict raw XHTML Documents</display-name>
               <web-resource-collection>
               <web-resource-name>XHTML</web-resource-name>
               <url-pattern>*.xhtml</url-pattern>
               </web-resource-collection>
               <auth-constraint>
               <role-name>NONE</role-name>
               </auth-constraint>
               </security-constraint>
              
               <!-- Trinidad -->
              
               <context-param>
               <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
               <!--<param-value>com.sun.facelets.FaceletViewHandler</param-value>-->
               <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
               </context-param>
              
               <filter>
               <filter-name>Trinidad</filter-name>
               <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
               </filter>
               <filter-mapping>
               <filter-name>Trinidad</filter-name>
               <!--<servlet-name>Faces Servlet</servlet-name>-->
               <url-pattern>*.seam</url-pattern>
               </filter-mapping>
              
               <servlet>
               <servlet-name>Trinidad Resources</servlet-name>
               <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
               </servlet>
               <servlet-mapping>
               <servlet-name>Trinidad Resources</servlet-name>
               <url-pattern>/adf/*</url-pattern>
               </servlet-mapping>
              
              
               <context-param>
               <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
               <param-value>false</param-value>
               </context-param>
              
               <welcome-file-list>
               <welcome-file>index.html</welcome-file>
               </welcome-file-list>
               <resource-ref>
               <res-ref-name>jdbc/TXOracleDS</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
               <res-sharing-scope>Shareable</res-sharing-scope>
               </resource-ref>
              </web-app>


              • 4. Re: Seam CVS+JBoss 4.2+Trinidad
                Chris Lowe Apprentice

                Can you post your faces-config too?

                • 5. Re: Seam CVS+JBoss 4.2+Trinidad
                  Brian Smith Apprentice

                  Here it is

                  <?xml version='1.0' encoding='UTF-8'?>
                  <!DOCTYPE faces-config PUBLIC
                   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
                  
                  <faces-config>
                  
                   <application>
                   <message-bundle>messages</message-bundle>
                   <!-- Disabled when using Ajax4JSF -->
                   <!--
                   <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
                   -->
                   <!-- Enable Trinidad renderkit -->
                   <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
                   </application>
                  
                   <!-- Seam transaction management -->
                   <lifecycle>
                   <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
                   </lifecycle>
                  
                   <!-- No Seam transaction management -->
                   <!--
                   <lifecycle>
                   <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
                   </lifecycle>
                   -->
                   <navigation-rule>
                   <from-view-id>/*</from-view-id>
                   <navigation-case>
                   <from-outcome>dialog:chooseCustomer</from-outcome>
                   <to-view-id>/AttachCustomer_dlg.xhtml</to-view-id>
                   </navigation-case>
                   </navigation-rule>
                  </faces-config>


                  I am getting suspicious that this has to do with my deployment setup since I can't seem to track it down in web.xml

                  • 6. Re: Seam CVS+JBoss 4.2+Trinidad
                    Chris Lowe Apprentice

                    I do not have an entry for org.ajax4jsf.VIEW_HANDLERS:

                    <context-param>
                     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                     <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
                     </context-param>



                    Try knocking that out.

                    • 7. Re: Seam CVS+JBoss 4.2+Trinidad
                      Brian Smith Apprentice

                      Its commented out above, sorry, I should have removed the comments, all green makes it hard to read.

                      • 8. Re: Seam CVS+JBoss 4.2+Trinidad
                        Chris Lowe Apprentice

                        And it didn't help that I was looking at the original web.xml...

                        Looking at your new definition, I didn't know about the Seam filters taking care of the A4J stuff. I just tried with my app, but it failed (possibly down to filter order, but I haven't the time to track that down so I'll resort to previous config).

                        Where are your Trinidad jars being deployed to and which versions are you using? Are there any references to old MyFaces libs still around? Which version of Seam are you using?

                        Now that JBoss 4.2.0 is using JSF, have you tried the latest Trinidad 1.2 builds (trinidad-*-1.2-07-may-SNAPSHOT.jar)?

                        In build.xml, I had to make changes for copying my various libs to WEB-INF/lib:

                         <copy todir="${war.dir}/WEB-INF/lib">
                         <fileset dir="${lib.dir}">
                         <include name="ajax4jsf.jar" />
                         <include name="oscache*.jar" />
                         <include name="jsf-facelets.jar" />
                         <include name="jboss-seam-*.jar" />
                         <include name="trinidad-*.jar" />
                         <exclude name="jboss-seam-gen.jar" />
                         <include name="commons-digester-*.jar" />
                         <include name="commons-beanutils-*.jar" />
                         <include name="commons-collections-*.jar" />
                         </fileset>
                         </copy>


                        I believe A4J has trouble with some of the commons-* libraries that are installed with 4.2.0. For the record, the exact versions I am using are:

                        commons-digester-1.6.jar
                        commons-beanutils-1.7.0.jar
                        commons-collections-3.1.jar

                        I also have the latest version of ajax4jsf (ajax4jsf-1.1.1-SNAPSHOT.jar) taken from the CVS jboss-seam/lib directory.

                        I *used* to need a4j-trinidad.jar, but I've not had any problems without out it for some time. Maybe that's down to the 1.1.1 version of A4J.

                        Finally, here's my web.xml. On a general note, with the exception of the Seam filters, all my filters are bound to a servlet name rather than a URL pattern.

                        <?xml version="1.0"?>
                        <web-app version="2.4"
                         xmlns="http://java.sun.com/xml/ns/j2ee"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
                        
                         <!-- JSF ************************************************************************************ -->
                        
                         <context-param>
                         <param-name>javax.faces.CONFIG_FILES</param-name>
                         <param-value>/WEB-INF/navigation.xml, /WEB-INF/managed-beans.xml,/WEB-INF/con-val.xml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                         <param-value>.xhtml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                         <param-value>client</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                         <param-value>false</param-value>
                         </context-param>
                        
                        
                         <!-- Trinidad ******************************************************************************* -->
                        
                         <context-param>
                         <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
                         <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
                         <param-value>false</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                        
                         <!-- Facelets ******************************************************************************* -->
                        
                         <context-param>
                         <param-name>facelets.LIBRARIES</param-name>
                         <param-value>/WEB-INF/facelets/ripuk.taglib.xml</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>facelets.DEVELOPMENT</param-name>
                         <param-value>true</param-value>
                         </context-param>
                        
                         <context-param>
                         <param-name>facelets.SKIP_COMMENTS</param-name>
                         <param-value>false</param-value>
                         </context-param>
                        
                        
                         <!-- Filters ******************************************************************************** -->
                        
                         <!-- ajax4jsf filter - must be before any other filter -->
                         <filter>
                         <display-name>Ajax4jsf Filter</display-name>
                         <filter-name>ajax4jsf</filter-name>
                         <filter-class>org.ajax4jsf.Filter</filter-class>
                         <init-param>
                         <param-name>forceparser</param-name>
                         <param-value>false</param-value>
                         </init-param>
                         </filter>
                        
                         <filter-mapping>
                         <filter-name>ajax4jsf</filter-name>
                         <servlet-name>Faces Servlet</servlet-name>
                         <dispatcher>REQUEST</dispatcher>
                         <dispatcher>FORWARD</dispatcher>
                         <dispatcher>INCLUDE</dispatcher>
                         </filter-mapping>
                        
                         <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>*.seam</url-pattern>
                         </filter-mapping>
                        
                        
                         <filter>
                         <filter-name>Seam Redirect Filter</filter-name>
                         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
                         </filter>
                        
                         <filter-mapping>
                         <filter-name>Seam Redirect Filter</filter-name>
                         <url-pattern>*.seam</url-pattern>
                         </filter-mapping>
                        
                        
                         <filter>
                         <filter-name>trinidad</filter-name>
                         <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter </filter-class>
                         </filter>
                        
                         <filter-mapping>
                         <filter-name>trinidad</filter-name>
                         <servlet-name>Faces Servlet</servlet-name>
                         </filter-mapping>
                        
                        
                         <!-- Listeners ****************************************************************************** -->
                        
                         <listener>
                         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                         </listener>
                        
                         <!-- JSF RI -->
                         <listener>
                         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                         </listener>
                        
                         <!-- Servlets ******************************************************************************* -->
                        
                         <servlet>
                         <servlet-name>Faces Servlet</servlet-name>
                         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                         <load-on-startup>1</load-on-startup>
                         </servlet>
                        
                         <servlet-mapping>
                         <servlet-name>Faces Servlet</servlet-name>
                         <url-pattern>*.seam</url-pattern>
                         </servlet-mapping>
                        
                        
                         <servlet>
                         <servlet-name>resources</servlet-name>
                         <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet </servlet-class>
                         </servlet>
                        
                         <servlet-mapping>
                         <servlet-name>resources</servlet-name>
                         <url-pattern>/adf/*</url-pattern>
                         </servlet-mapping>
                        
                        
                         <!-- Misc *********************************************************************************** -->
                        
                         <login-config>
                         <auth-method>BASIC</auth-method>
                         </login-config>
                        
                         <error-page>
                         <error-code>404</error-code>
                         <location>/public/home.seam</location>
                         </error-page>
                        
                         <session-config>
                         <session-timeout>30</session-timeout>
                         </session-config>
                        </web-app>


                        • 9. Re: Seam CVS+JBoss 4.2+Trinidad
                          Brian Smith Apprentice

                          Ok Chris I got it working. I am almost too embarrassed to tell you the problem. In converting to JBoss 4.2, I used SeamGen to generate a new project (I was using a Netbeans JEE project). Well seamgen decided to put my facelets templates in a different location. So the templates were not being found hence the 404's. The strange part is I was not getting any standard facelet error messages to that effect in the server log, just these strange A4J Filter messages. Ah well, thanks for all your help.

                          BTW, you can slim down your web.xml a bit. You can consolidate your Seam Exception Filter and Seam Redirect Filter into one

                           <filter>
                           <filter-name>Seam Filter</filter-name>
                           <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
                           </filter>
                          
                           <filter-mapping>
                           <filter-name>Seam Filter</filter-name>
                           <url-pattern>/*</url-pattern>
                           </filter-mapping>


                          This was introduced in Seam 1.2

                          Also you can get rid of the A4J filter all together, the Seam Filter takes care of this as well (I think this is new in CVS)

                          • 10. Re: Seam CVS+JBoss 4.2+Trinidad
                            Chris Lowe Apprentice

                            Glad to hear you're working with this. I'll give the suggested web.xml changes a try.

                            Cheers,

                            Chris.