4 Replies Latest reply on May 3, 2009 8:46 PM by nbelaevski

    Issue with apache tomcat and richfaces

      Hi All,

      I have a problem with Apache, Tomcat and Richfaces combo.

      You can see from my logs that apache returns a 200 for my login page then returns a 404 from

      GET /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=483272B32E87258CAA51358838510D4C.tomcat1 HTTP/1.1" 404 7014

      The seems to be an issue now and then. It works for a while then it tosses a 404.

      Any help out there?

      Phil


      66.104.22.9 - - [29/Apr/2009:14:10:50 -0400] "GET /login.jsf HTTP/1.1" 200 3303 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=483272B32E87258CAA51358838510D4C.tomcat1 HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
       404 here
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=483272B32E87258CAA51358838510D4C.tomcat1 HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
       404 here
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/stylesheet.css HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /js/jquery-1.2.3.pack.js HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /js/jquery.jcarousel.pack.js HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/jquery.jcarousel.css HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /css/skin.css HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /images/prev-horizontal.png HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
      66.104.22.9 - - [29/Apr/2009:14:10:51 -0400] "GET /images/next-horizontal.png HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"



        • 1. Re: Issue with apache tomcat and richfaces
          nbelaevski

          Hello,

          Can you please describe your configuration in more details: Tomcat/Apache/Connector versions and web.xml file?

          • 2. Re: Issue with apache tomcat and richfaces

            Thanks for the reply

            apache-tomcat-6.0.18
            apache 2
            mod_jd

            web.xml
            =================

            <?xml version="1.0" encoding="UTF-8"?>
            <web-app id="WebApp_ID" 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">


            <error-page>

            <error-code>404</error-code>
            /error404.jsp

            <error-code>400</error-code>
            /error500.jsp

            <error-code>403</error-code>
            /error500.jsp

            <error-code>500</error-code>
            /error500.jsp

            </error-page>


            <error-page>
            <exception-type>javax.faces.application.ViewExpiredException</exception-type>
            /index.jsp
            </error-page>

            <error-page>
            <exception-type>java.lang.Exception</exception-type>
            /index.jsp
            </error-page>

            <!-- 2. Context Parameters -->

            <session-config>
            <session-timeout>22</session-timeout>
            </session-config>

            <context-param>
            <param-name>saveStateInClient</param-name>
            <param-value>false</param-value>
            </context-param>

            <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
            </context-param>

            <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.jsp</param-value>
            </context-param>

            <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
            </context-param>

            <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
            </context-param>

            <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
            </context-param>


            <context-param>
            <param-name>org.richfaces.LoadScriptStrategy</param-name>
            <param-value>DEFAULT</param-value>
            </context-param>

            <context-param>
            <param-name>org.richfaces.SKIN</param-name>
            <param-value>blueSky</param-value>
            </context-param>


            <context-param>
            <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
            <param-value>true</param-value>
            </context-param>






            <display-name>RichFaces Filter</display-name>
            <filter-name>richfaces</filter-name>
            <filter-class>org.ajax4jsf.Filter</filter-class>

            <init-param>
            <param-name>createTempFiles</param-name>
            <param-value>false</param-value>
            </init-param>

            <init-param>
            <param-name>maxRequestSize</param-name>
            <param-value>1570123</param-value>
            </init-param>


            <filter-mapping>
            <filter-name>richfaces</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            FORWARD
            REQUEST
            INCLUDE
            ERROR
            </filter-mapping>



            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>


            <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
            </servlet-mapping>






            <servlet-name>ReadLogs</servlet-name>
            <servlet-class>com.myApp.java.admin.ReadLogs</servlet-class>


            <servlet-mapping>
            <servlet-name>ReadLogs</servlet-name>
            <url-pattern>/myAppadmin/readlogs</url-pattern>
            </servlet-mapping>


            <servlet-name>InsertMember</servlet-name>
            <servlet-class>com.myApp.java.insertSql.InsertMember</servlet-class>



            <servlet-mapping>
            <servlet-name>InsertMember</servlet-name>
            <url-pattern>/InsertMember</url-pattern>
            </servlet-mapping>

            <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>



            <mime-mapping>
            html
            <mime-type>text/html</mime-type>
            </mime-mapping>

            <mime-mapping>
            txt
            <mime-type>text/plain</mime-type>
            </mime-mapping>

            <mime-mapping>
            xls
            <mime-type>application/excel</mime-type>
            </mime-mapping>


            </web-app>

            =======================

            workers.properties

            =======================

            # workers.properties
            # In Unix, we use forward slashes:
            ps=/

            # list the workers by name
            worker.list=loadbalancer

            #
            # Specifies the load balance factor when used with
            # a load balancing worker.
            # Note:
            # ----> lbfactor must be > 0
            # ----> Low lbfactor means less work done by the worker.

            # ------------------------
            # First tomcat server
            # ------------------------
            worker.tomcat1.port=8009
            worker.tomcat1.host=192.168.60.112
            worker.tomcat1.type=ajp13
            worker.tomcat1.lbfactor=33

            # ------------------------
            # Second tomcat server
            # ------------------------
            worker.tomcat2.port=9009
            worker.tomcat2.host=192.168.60.114
            worker.tomcat2.type=ajp13
            worker.tomcat2.lbfactor=33

            # ------------------------
            # Third tomcat server
            # ------------------------
            worker.tomcat3.port=10009
            worker.tomcat3.host=192.168.60.115
            worker.tomcat3.type=ajp13
            worker.tomcat3.lbfactor=33

            # -----------------------
            # Load Balancer worker
            # ------------------------
            #
            # The loadbalancer (type lb) worker performs weighted round-robin
            # load balancing with sticky sessions.
            # Note:
            # ----> If a worker dies, the load balancer will check its state
            # once in a while. Until then all work is redirected to peer
            # worker.
            worker.loadbalancer.type=lb
            #worker.loadbalancer.balanced_workers=tomcat1,tomcat2,tomcat3

            worker.loadbalancer.balance_workers=tomcat1,tomcat2,tomcat3

            #
            # END workers.properties
            #

            ==========================

            • 3. Re: Issue with apache tomcat and richfaces

              Typo...mod_jk as the ajp connector

              • 4. Re: Issue with apache tomcat and richfaces
                nbelaevski

                Hello,

                web.xml looks ok. Can you please check that all cluster nodes have the identical web.xml settings and identical libraries? Also looks like you are using 3.2.2-snapshot version, have you checked with GA/SR?