4 Replies Latest reply on Oct 7, 2010 11:08 AM by Daniel Dausch

    Issue using RichFaces 4

    Daniel Dausch Newbie

      I am developing an RichFaces app from scratch (not migrated) to experiment with RichFaces 4.0. I am using Eclipse Helios, and Tomcat 6. I am using Mojarra 2.0.2-FCS release and RichFaces 4.0.0.M2. I did have some class not found issues so I ended up using core-impl-4, components-ui-4,components-api-4 and core-api-4. My web.xml is pretty simple as follows:

       

      <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>xxxxxxxx</display-name>

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

             <context-param>
                <param-name>org.richfaces.skin</param-name>
                <param-value>blueSky</param-value>
           </context-param>
       
           <!-- Making the RichFaces skin spread to standard HTML controls -->
           <context-param>
                <param-name>org.richfaces.enableControlSkinning</param-name>
                <param-value>enable</param-value>
           </context-param>
           <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>client</param-value>
          </context-param>
        
           <!-- 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>
          
           <!-- Faces Servlet Mapping -->
           
           <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>/faces/*</url-pattern>
            </servlet-mapping>

       

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

       

      </web-app>

       

      I have also pulled in libs such as to resolve some earlier class not found issues:

      jhighlight-1.0

      commons-beannutils-1.7

      commons-collections-3.2

      commons-digester-1.8

      commons-logging-1.1.1

      jstl-1.2

      sl4j-api-1.5.2

      sl4j-log4j12-1.5.2

       

      At this point my app is failing to start up with the following error:

       

      2010-10-01 13:18:49,429 ERROR main org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/xxxxx] - Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.google.common.base.Joiner
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:354)
          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:807)
          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:519)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
          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:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.ClassNotFoundException: com.google.common.base.Joiner
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at org.richfaces.resource.ResourceFactoryImpl.<clinit>(ResourceFactoryImpl.java:50)
          at org.richfaces.resource.ResourceHandlerImpl.<init>(ResourceHandlerImpl.java:64)
          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 com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:265)
          at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:752)
          at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:310)
          at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
          at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
          at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
          at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:223)
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
          ... 16 more
      2010-10-01 13:18:49,444 ERROR main org.apache.catalina.core.StandardContext - Error listenerStart
      2010-10-01 13:18:49,444 ERROR main org.apache.catalina.core.StandardContext - Context [/xxxxxxx] startup failed due to previous errors
      2010-10-01 13:18:49,788 INFO main org.apache.coyote.http11.Http11Protocol - Starting Coyote HTTP/1.1 on http-8080
      2010-10-01 13:18:49,804 INFO main org.apache.catalina.startup.Catalina - Server startup in 3480 ms

       

      Any thoughts about how to address the error? Do I need to include the jar with: com.google.common.base.Joiner

      Is this a dependency with 4.0? As an fyi, i first got the app to work just as a JSF 2.0 app before adding the RichFaces.

       

      Thanks.

        • 1. Re: Issue using RichFaces 4
          Artem Baranchuk Newbie

          Unfortunately I have the same problem. I have desided to bind RichFaces 4.0.0.M2 with my application. I'm using Glassfish v3.

          During launching I cought the following error:

           

          com.sun.enterprise.admin.cli.remote.RemoteFailureException: Exception while loading the app : java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.google.common.base.Joiner

           


              at com.sun.enterprise.admin.cli.remote.ManifestManager.processGeneric(ManifestManager.java:111)
              at com.sun.enterprise.admin.cli.remote.ManifestManager.process(ManifestManager.java:67)
              at com.sun.enterprise.admin.cli.remote.RemoteResponseManager.handleManifest(RemoteResponseManager.java:108)
              at com.sun.enterprise.admin.cli.remote.RemoteResponseManager.process(RemoteResponseManager.java:82)
              at com.fuhrer.idea.glassfish.server.GlassfishServer3.parseResponse(GlassfishServer3.java:147)
              at com.fuhrer.idea.glassfish.server.GlassfishServer3.invoke(GlassfishServer3.java:107)
              at com.fuhrer.idea.glassfish.server.GlassfishServer3.handleDeployment(GlassfishServer3.java:57)
              at com.fuhrer.idea.javaee.server.JavaeeServerInstance$2.run(JavaeeServerInstance.java:130)
              at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:331)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619)
              at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)

           

          I found com.google.common.base.Joiner in weld-osgi-bundle.jar in my application server. So, I think RichFaces 4.0.0.M2 conflicts with this jar.

          How can I fix this problem?

          • 2. Re: Issue using RichFaces 4
            Daniel Dausch Newbie

            Thanks for the reply Artem. Given that i did not get any more replies I took the path of least resistance and added the google collections jar: guava-r07 to my lib set and got past the problem. I would appreciate it if someone could tell me why this is required? Is this a new dependency in 4.0? I did not see anything mentioned in the docs i have. Thanks.

            • 3. Re: Issue using RichFaces 4
              Ilya Shaikovsky Master

              Our documentation also on it's way to release so could miss something. You could check the dependencies in distribution readme files if not using maven. and if using - check please http://community.jboss.org/wiki/HowtoaddRichFaces4xtomavenbasedproject

              1 of 1 people found this helpful
              • 4. Re: Issue using RichFaces 4
                Daniel Dausch Newbie

                Thanks for the reply Ilya.