3 Replies Latest reply on Aug 9, 2011 4:42 PM by mpgong

    Rendering issue with Richfaces 4 and JBoss AS 5.1

    mpgong

      Hello,

       

      I'm having issues running the RichFaces 4 on JBoss 5.1 (from SOA-P 5).

       

      I created a simply page to to see if things are configured correctly.  But the page doesn't seem to render like i was expecting.  I used JBoss web tools and created a JSF Project added the libraries and everything deployed with out issues.

       

      Here is what the web page looks like.

       

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
          <f:view>
              <h:head></h:head>
              <h:body>
                  <rich:panel header="Richfaces running on JBoss">
                      <ul>
                          <li>RichFaces is a component library for JSF and an advanced
                              framework</li>
                          <li>for easily integrating AJAX capabilities into business
                              applications.</li>
                      </ul>
                  </rich:panel>
              </h:body>
          </f:view>
      </ui:composition>
      

       

      I was expecting the page to have header like this. rich4_test.PNG

       

      But it doesn't render it and all i see is the bulleted text.

       

      Here is my Web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.5"
       xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
       <display-name>TestRichFaces</display-name>
       <context-param>
              <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
              <param-value>true</param-value>
          </context-param>
       <servlet>
        <servlet-name>Faces Config</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       </servlet>
       <servlet-mapping>
        <servlet-name>Faces Config</servlet-name>
        <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
       <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
       </welcome-file-list>
      </web-app>
      

       

      And my faces-config.xml

       

      <?xml version="1.0"?>
      <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xi="http://www.w3.org/2001/XInclude"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"/>
      

       

      My libs included in the project.

       

      libs.png

      And finally output from the server console after deploying.

       

       

      10:08:10,330 INFO  [TomcatDeployment] deploy, ctxPath=/TestRichFaces
      10:08:10,679 INFO  [StandardContext] The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
      10:08:10,798 INFO  [config] Initializing Mojarra (1.2_13-b01-FCS) for context '/TestRichFaces'
      10:08:24,199 SEVERE [application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider' does not implement the InjectionProvider interface.
      10:08:24,202 INFO  [application] JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
      10:08:38,158 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.NotNull, but that class is not presented
      10:08:38,158 WARNING [Config] Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented
      10:08:38,159 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.Size, but that class is not presented
      10:08:38,159 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.Pattern, but that class is not presented
      10:08:38,160 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.Min, but that class is not presented
      10:08:38,160 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.Max, but that class is not presented
      10:08:38,161 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.AssertTrue, but that class is not presented
      10:08:38,161 WARNING [Config] Found JavaScript function definition for class javax.validation.constraints.AssertFalse, but that class is not presented
      10:08:38,180 INFO  [Cache] Selected fallback cache factory
      10:08:38,185 INFO  [Cache] Creating LRUMap cache instance using parameters: {com.sun.faces.duplicateJARPattern=^tmp\d+(\S*\.jar), com.sun.faces.injectionProvider=org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider, org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL=true}
      10:08:38,189 INFO  [Cache] Creating LRUMap cache instance of 512 items capacity
      10:08:38,210 INFO  [Application]  by , version v. SVN r.
      
      

       

       

      So everything looks normal.  Just wondering if anyone knows why I wouldn't see the proper panel with the header.  Am i using the tags incorrectly or have something configured wrong. 

       

      Thanks

        • 1. Re: Rendering issue with Richfaces 4 and JBoss AS 5.1
          mpgong

          Well, without adding too many other libs and such i've fallen back to RF 3.3.3 and that seems to work.

           

          Will try out a few examples from the demo page to be sure.

          • 2. Re: Rendering issue with Richfaces 4 and JBoss AS 5.1
            zarathos

            I'm having the same issue, it appears as if the FacesServlet is not being called or the processing of the page is not being handled.  As I can do a view source and can see my entire markup. <h:head>.....

             

            I believe that it is a configuration issue, but cannot determine what I need to add since everything I read say that configuration is almost not necessary..

             

            Any help would be greatly appreciated!

             

            James.

            • 3. Re: Rendering issue with Richfaces 4 and JBoss AS 5.1
              mpgong

              Are you using RF 4 and Jboss 5.1?

               

              I have not been able to get those two to work correctly.  To use RF4 i tried JBoss 6 and that works.  For JBoss 5.1 i just fell back to RF 3.3.3.  Though i think you can still get RF 4 to work with 5.1, but i think it requires making more changes to what is installed under 5.1 which i wouldn't be able to do so i didn't try.