5 Replies Latest reply on Jun 15, 2010 7:20 AM by Ilya Shaikovsky

    richFaces & netbeans 6.8

    Flavio Palumbo Newbie

      Hi all,

       

      I've seen  the post of mr. Salman Pan on March, 02, but unfortunatly i run into a similar problem.

      If i use ie explorer i see a blank page, while if i use firefox i see flavio and nothing else.

      I use tomcat 6.0.20.

      Here are my settings :

       

      web.xml :

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app 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">
          <context-param>
              <param-name>javax.faces.PROJECT_STAGE</param-name>
              <param-value>Development</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>/faces/*</url-pattern>
          </servlet-mapping>
          <session-config>
              <session-timeout>
                  30
              </session-timeout>
          </session-config>

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


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


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


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


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

       


          <welcome-file-list>
              <welcome-file>faces/index.xhtml</welcome-file>
          </welcome-file-list>
      </web-app>

       

      index.xhtml :

       

      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich">
          <h:head>
              <title>Facelet Title</title>
          </h:head>
          <h:body>
              <h1>Flavio</h1>

              <a4j:form>
                  <rich:panel header="Richfaces Panel" style="width:315px;">
                      <h:outputText value ="Your name :"/>
                   </rich:panel>
              </a4j:form>
          </h:body>
      </html>

       

      these are jars :

       

      richfaces-api-3.3.3.Final.jar

      richfaces-impl-jsf2-3.3.3.Final.jar

      richfaces-ui-3.3.3.Final.jar

       

      commons-beanutils-1.8.3.jar

      commons-beanutils-bean-collections-1.8.3.jar

      commons-beanutils-core-1.8.3.jar

      commons-collections-3.2.1.jar

      commons-collections-testframework-3.2.1.jar

      commons-digester-2.0.jar

      commons-logging-1.1.1.jar

      commons-logging-adapters-1.1.1.jar

      commons-logging-api-1.1.1.jar

      commons-logging-tests.jar

       

      i got also an exception :

       

      9-giu-2010 13.39.22 org.apache.catalina.core.StandardContext listenerStart
      GRAVE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
              at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<clinit>(ChameleonRenderKitFactory.java:50)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:586)
              at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:472)
              at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
              at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:796)
              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
              at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:220)
              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
              at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
              at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
              at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
              at org.apache.catalina.core.StandardService.start(StandardService.java:516)
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
              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:597)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

       

      Any hint would be appreciated.

      Flavio

        • 2. Re: richFaces & netbeans 6.8
          Flavio Palumbo Newbie

          Hi,

          thanks for your answer, but i'm not able to make it work.

          I tried to follow step by step the post at "Problem with Richfaces 3.3.3 and JSF 2.0" but i didn't solve.

          Well, to be honest, i've no more exceptions, but i cannot get RichFaces component to work.

          I added jhighlight-1.0.jar and jsf-facelets.jar to my project.

           

          Here is my web.xml :

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

              <context-param>
                  <param-name>org.richfaces.SKIN</param-name>
                  <param-value>blueSky</param-value>
              </context-param>
              <context-param>
                  <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                  <param-value>enable</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>org.ajax4jsf.VIEW_HANDLERS</param-name>
                  <param-value>com.sun.facelets.FaceletViewHandler</param-value>
              </context-param>
              -->
              <context-param>
                  <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
                  <param-value>true</param-value>
              </context-param>

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

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

              <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>/faces/*</url-pattern>
                  <!--   <url-pattern>*.jsf</url-pattern>  -->
              </servlet-mapping>

              <login-config>
                  <auth-method>BASIC</auth-method>
              </login-config>

              <context-param>
                  <param-name>javax.faces.PROJECT_STAGE</param-name>
                  <param-value>Development</param-value>
              </context-param>
              <session-config>
                  <session-timeout>
                      30
                  </session-timeout>
              </session-config>

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

              <welcome-file-list>
                  <welcome-file>faces/index.xhtml</welcome-file>
              </welcome-file-list>
          </web-app>

           

          Sure i mistake something but i cannot find it.

          Can give me a little help more ?

          Thanks a lot

          Flavio

          • 3. Re: richFaces & netbeans 6.8
            Flavio Palumbo Newbie

            Sorry if i follow so quickly in my post, but it seems there's no way to make my project work.

            I reread  the post "Problem with Richfaces 3.3.3 and JSF 2.0" many times, trying to discover where is difference with my project ... but i was not able to find the culprit 

            The project is very very simple, here is web.xml :

             

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

                <context-param>
                    <param-name>org.richfaces.SKIN</param-name>
                    <param-value>blueSky</param-value>
                </context-param>
                <context-param>
                    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                    <param-value>enable</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>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
                    <param-value>true</param-value>
                </context-param>
            <!--
                <context-param>
                    <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                    <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                </context-param>
            -->
                <filter>
                    <display-name>RichFaces Filter</display-name>
                    <filter-name>richfaces</filter-name>
                    <filter-class>org.ajax4jsf.Filter</filter-class>
                </filter>

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

                <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>/faces/*</url-pattern>
                    <!--   <url-pattern>*.jsf</url-pattern>  -->
                </servlet-mapping>

                <login-config>
                    <auth-method>BASIC</auth-method>
                </login-config>

                <context-param>
                    <param-name>javax.faces.PROJECT_STAGE</param-name>
                    <param-value>Development</param-value>
                </context-param>
                <session-config>
                    <session-timeout>
                        30
                    </session-timeout>
                </session-config>

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

                <welcome-file-list>
                    <welcome-file>faces/index.xhtml</welcome-file>
                </welcome-file-list>
            </web-app>

             

            these are all jars :

            jsf-api.jar

            jsf-impl.jar

            jstl.jar

            standard.jar

            junit-3.8.2.jar

            junit-4.5.jar

            junit-4.5-src.jar

            richfaces-api-3.3.3.Final.jar

            richfaces-impl-jsf2-3.3.3.Final.jar

            richfaces-ui-3.3.3.Final.jar

            commons-beanutils-1.8.3.jar

            commons-collections-3.2.1.jar

            commons-digester-2.0.jar

            commons-logging-1.1.1.jar

            jhighlight-1.0.jar

            jsf-facelets-1.1.15.jar

             

            and this is my index.xhtml :

            <?xml version='1.0' encoding='UTF-8' ?>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:a4j="http://richfaces.org/a4j"
                  xmlns:rich="http://richfaces.org/rich">
                <h:head>
                    <title>Facelet Title</title>
                </h:head>
                <h:body>
                    <h1>Flavio</h1>

                    <a4j:form>
                        <rich:panel header="Richfaces Panel" style="width:315px;">
                            <h:outputText value ="Your name :"/>
                         </rich:panel>
                    </a4j:form>
                </h:body>
            </html>

             

             

            Please help, i need to unlock this crazy situation.

            Any hint would be appreciated.

            Flavio

            • 4. Re: richFaces & netbeans 6.8
              Flavio Palumbo Newbie

              Can anybody post a simple working example of jsf2 & richfaces ?

              Thanks a lot

              Flavio