0 Replies Latest reply on Jul 11, 2011 1:53 PM by paulbotta

    Issue Migrating to Rich Faces 4.0

    paulbotta

      I am experiencing problems migrating to Rich Faces 4 and am requesting assistance.

       

      My project uses Rich Faces 4.0.0.Final, Spring 3.0.5, JSF 2.0.0-RC2 and runs on Tomcat 6.

       

      An earlier version of the project successfully ran using jsf 1.2 and Rich Faces 3.3.1.GA.

       

      When I start Tomcat and point my browser to my application, the XML of my mainapp.xhtml page is displayed.

       

       

      lib contains:

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

      aopalliance-1.0.jar

      commons-lang-2.5.jar

      commons-logging-1.1.1.jar

      cssparser-0.9.5.jar

      guava-r08.jar

      jsf-api-2.0.0-RC2.jar

      jsf-facelets-1.1.14.jar

      jsf-impl-2.0.0-RC2.jar

      jstl-1.1.2.jar

      log4j-1.2.16.jar

      mysql-connector-java-5.1.16.jar

      openjpa-all-2.1.0.jar

      richfaces-components-api-4.0.0.Final.jar

      richfaces-components-ui-4.0.0.Final.jar

      richfaces-core-api-4.0.0.Final.jar

      richfaces-core-impl-4.0.0.Final.jar

      sac-1.3.jar

      servlet-api-2.5.jar

      spring-aop-3.0.5.RELEASE.jar

      spring-asm-3.0.5.RELEASE.jar

      spring-beans-3.0.5.RELEASE.jar

      spring-context-3.0.5.RELEASE.jar

      spring-context-support-3.0.5.RELEASE.jar

      spring-core-3.0.5.RELEASE.jar

      spring-expression-3.0.5.RELEASE.jar

      spring-jdbc-3.0.5.RELEASE.jar

      spring-orm-3.0.5.RELEASE.jar

      spring-oxm-3.0.5.RELEASE.jar

      spring-test-3.0.5.RELEASE.jar

      spring-tx-3.0.5.RELEASE.jar

      spring-web-3.0.5.RELEASE.jar

      spring-webmvc-3.0.5.RELEASE.jar

      spring-webmvc-portlet-3.0.5.RELEASE.jar

       

       

      web.xml

      =======

      <?xml version = '1.0' encoding = 'windows-1252'?>

       

      <web-app 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" xmlns="http://java.sun.com/xml/ns/j2ee">

       

        <display-name>XYZ</display-name>

       

        <context-param>

          <param-name>webAppRootKey</param-name>

          <param-value>XYZ.root</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>contextConfigLocation</param-name>

          <param-value>

            /WEB-INF/applicationContext*.xml

          </param-value>

        </context-param>

       

         <context-param>

          <param-name>log4jConfigLocation</param-name>

          <param-value>/WEB-INF/log4j.xml</param-value>

        </context-param>

       

       

        <!-- Facelet Config  -->

        <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>.xhtml</param-value>

        </context-param>

       

         <context-param>

          <param-name>org.richfaces.SKIN</param-name>

          <param-value>darkX</param-value>

        </context-param>

       

        <context-param>

          <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

          <param-value>com.sun.facelets.FaceletViewHandler</param-value>

        </context-param>

          

        <context-param>

          <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

          <param-value>true</param-value>

        </context-param>

       

        <context-param>

          <param-name>org.richfaces.LoadStyleStrategy</param-name>

          <param-value>all</param-value>

        </context-param>

       

        <context-param>

          <param-name>org.richfaces.LoadScriptStrategy</param-name>

          <param-value>all</param-value>

        </context-param>

       

        <context-param>

          <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>

          <param-value>true</param-value>

        </context-param>

                     

        <context-param>

          <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>

          <param-value>true</param-value>

        </context-param>

             

        <context-param>

          <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>

          <param-value>true</param-value>

        </context-param>

             

       

        <listener>

          <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>

        </listener>

       

        <listener>

          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

        </listener>

       

        <listener>

          <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>

        </listener>

       

        <listener>

          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

        </listener>

                     

        <!-- Faces Servlet -->

        <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>*.jsf</url-pattern>

        </servlet-mapping>

                     

        <session-config>

          <session-timeout>30</session-timeout>

        </session-config>

       

        <welcome-file-list>

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

        </welcome-file-list>

             

      </web-app>

       

       

      index.jsp

      =========

      <html>

        <head>

          <title>XYZ</title>

        </head>

       

        <body>

       

      <%

          String redirectURL =  "./mainapp.jsf";

          response.sendRedirect(redirectURL);

      %>

       

        </body>

       

      </html>

       

       

       

      mainapp.xhtml

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

      <ui:composition

              template="/WEB-INF/pages/templates/page-template.xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core"

          xmlns:rich="http://richfaces.org/rich"

          xmlns:a4j="http://richfaces.org/a4j">

       

       

         <h:outputText value="HOME00" />

        

          <ui:define name="page-content">

               <ui:include src="WEB-INF/pages/content.xhtml" />

          </ui:define>   

         

      </ui:composition>

       

       

      catalina.log

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

      Jul 11, 2011 10:30:32 AM org.apache.catalina.core.AprLifecycleListener init

      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Documents and Settings\Bottabing\My Documents\Development\tools\apache-maven-3.0.3\bin;C:\Documents and Settings\Bottabing\My Documents\Development\tools\apache-ant-1.7.0\bin;C:\Program Files\Java\jdk1.6.0_26\bin;;.

      Jul 11, 2011 10:30:32 AM org.apache.coyote.http11.Http11Protocol init

      INFO: Initializing Coyote HTTP/1.1 on http-8080

      Jul 11, 2011 10:30:34 AM org.apache.coyote.http11.Http11Protocol init

      INFO: Initializing Coyote HTTP/1.1 on http-8443

      Jul 11, 2011 10:30:34 AM org.apache.catalina.startup.Catalina load

      INFO: Initialization processed in 2337 ms

      Jul 11, 2011 10:30:34 AM org.apache.catalina.core.StandardService start

      INFO: Starting service Catalina

      Jul 11, 2011 10:30:34 AM org.apache.catalina.core.StandardEngine start

      INFO: Starting Servlet Engine: Apache Tomcat/6.0.20

      Jul 11, 2011 10:30:34 AM org.apache.catalina.startup.HostConfig deployWAR

      INFO: Deploying web application archive tire-processor.war

      Jul 11, 2011 10:30:35 AM org.apache.catalina.loader.WebappClassLoader validateJarFile

      INFO: validateJarFile(C:\Documents and Settings\Bottabing\My Documents\Development\tools\apache-tomcat-6.0.20\webapps\xyz\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

      Jul 11, 2011 10:30:35 AM org.apache.catalina.core.StandardContext addApplicationListener

      INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

      Jul 11, 2011 10:30:39 AM com.sun.faces.config.ConfigureListener contextInitialized

      INFO: Initializing Mojarra 2.0.0 (RC2 b22) for context '/xyz'

      Jul 11, 2011 10:30:43 AM org.richfaces.javascript.ClientServiceConfigParser parse

      WARNING: Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented

      Jul 11, 2011 10:30:44 AM org.richfaces.cache.CacheManager getCacheFactory

      INFO: Selected fallback cache factory

      Jul 11, 2011 10:30:44 AM org.richfaces.cache.lru.LRUMapCacheFactory createCache

      INFO: Creating LRUMap cache instance using parameters: {org.ajax4jsf.VIEW_HANDLERS=com.sun.facelets.FaceletViewHandler, org.ajax4jsf.COMPRESS_SCRIPT=true, javax.faces.CONFIG_FILES=/WEB-INF/faces-config.xml, org.richfaces.SKIN=darkX, org.ajax4jsf.handleViewExpiredOnClient=true, org.richfaces.LoadScriptStrategy=all, org.richfaces.LoadStyleStrategy=all, webAppRootKey=XYZ.root, log4jConfigLocation=/WEB-INF/log4j.xml, javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER=true, contextConfigLocation=/WEB-INF/applicationContext*.xml, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml, com.sun.faces.enableRestoreView11Compatibility=true}

      Jul 11, 2011 10:30:44 AM org.richfaces.cache.lru.LRUMapCacheFactory createCache

      INFO: Creating LRUMap cache instance of 512 items capacity

      Jul 11, 2011 10:30:44 AM org.richfaces.application.InitializationListener onStart

      INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.Final SVN r.22269

      Jul 11, 2011 10:30:44 AM org.apache.coyote.http11.Http11Protocol start

      INFO: Starting Coyote HTTP/1.1 on http-8080

      Jul 11, 2011 10:30:44 AM org.apache.coyote.http11.Http11Protocol start

      INFO: Starting Coyote HTTP/1.1 on http-8443

      Jul 11, 2011 10:30:45 AM org.apache.jk.common.ChannelSocket init

      INFO: JK: ajp13 listening on /0.0.0.0:8009

      Jul 11, 2011 10:30:45 AM org.apache.jk.server.JkMain start

      INFO: Jk running ID=0 time=0/62  config=null

      Jul 11, 2011 10:30:45 AM org.apache.catalina.startup.Catalina start

      INFO: Server startup in 10988 ms