12 Replies Latest reply on Apr 12, 2008 8:16 AM by Stephan Erlank

    3.2.0.GA - not working for me

    Stephan Erlank Newbie

      Hi,

      I'm using RichFaces 3.2.0.GA with Sun RI 1.2_07 on Tomcat 6, but when I deploy my application, I get the following exception :

      ERROR : Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
       Source Document: jar:file:/C:/Programming/Workspaces/Erlank/tomcat/work/catalina/localhost/tracks/WEB-INF/lib/richfaces-impl-3.2.0.GA.jar!/META-INF/faces-config.xml
       Cause: Unable to create a new instance of 'org.ajax4jsf.application.AjaxStateManager': java.lang.reflect.InvocationTargetException
       at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:212)
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:174)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
       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:525)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
       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:566)
       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:585)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: com.sun.faces.config.ConfigurationException:
       Source Document: jar:file:/C:/Programming/Workspaces/Erlank/tomcat/work/catalina/localhost/tracks/WEB-INF/lib/richfaces-impl-3.2.0.GA.jar!/META-INF/faces-config.xml
       Cause: Unable to create a new instance of 'org.ajax4jsf.application.AjaxStateManager': java.lang.reflect.InvocationTargetException
       at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:234)
       at com.sun.faces.config.processor.ApplicationConfigProcessor.setStateManager(ApplicationConfigProcessor.java:357)
       at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:233)
       at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:94)
       at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
       at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:94)
       at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
       at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:202)
       ... 25 more
      

      When I use 3.1.4.GA everything works fine. Any ideas?

        • 1. Re: 3.2.0.GA - not working for me
          Steve Whatmore Newbie

          Did you do a clean of the Tomcat (project) directory?

          • 2. Re: 3.2.0.GA - not working for me
            Stephan Erlank Newbie

            Just cleaned the temp and work dirs, but I'm still getting the same error.

            • 3. Re: 3.2.0.GA - not working for me
              Sergey Smirnov Master

              post list of jar files you have in the WEB-INF/lib. If you have a additional libs shared in the Tomcat shared lib folder, mentioned them too. (Additional means the ones that are not shipped with Tomcat itself)

              • 4. Re: 3.2.0.GA - not working for me
                Stephan Erlank Newbie

                I have switched to myfaces 1.2.2 and now it's working great.

                • 5. Re: 3.2.0.GA - not working for me
                  Sergey Smirnov Master

                  Do you mean you switched to myfaces 1.2.2 from Sun RI 1.2_07 ?

                  • 7. Re: 3.2.0.GA - not working for me
                    Ilya Shaikovsky Master

                    anyway could you please give us detailed environment? Look through Sergey's post and attach web.xml also. Non worked version of course..

                    Will be very helpfull.

                    • 8. Re: 3.2.0.GA - not working for me
                      Stephan Erlank Newbie

                      Ok, 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>javax.faces.CONFIG_FILES</param-name>
                       <param-value>/WEB-INF/config/faces.xml</param-value>
                       </context-param>
                      
                       <context-param>
                       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                       <param-value>.jspx</param-value>
                       </context-param>
                      
                       <context-param>
                       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                       <param-value>server</param-value>
                       </context-param>
                      
                       <filter>
                       <filter-name>RichFaces Filter</filter-name>
                       <filter-class>org.ajax4jsf.Filter</filter-class>
                       </filter>
                      
                       <filter-mapping>
                       <filter-name>RichFaces Filter</filter-name>
                       <servlet-name>Faces Servlet</servlet-name>
                       <dispatcher>FORWARD</dispatcher>
                       <dispatcher>INCLUDE</dispatcher>
                       <dispatcher>REQUEST</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>*.jsf</url-pattern>
                       </servlet-mapping>
                      
                       <security-constraint>
                       <web-resource-collection>
                       <web-resource-name>jspx</web-resource-name>
                       <url-pattern>*.jspx</url-pattern>
                       </web-resource-collection>
                       <auth-constraint>
                       </auth-constraint>
                       </security-constraint>
                      
                       <welcome-file-list>
                       <welcome-file>index.jsp</welcome-file>
                       </welcome-file-list>
                      
                      </web-app>
                      


                      My pom dependencies :
                      <dependencies>
                       <dependency>
                       <groupId>com.sun.facelets</groupId>
                       <artifactId>jsf-facelets</artifactId>
                       <version>1.1.14</version>
                       <scope>runtime</scope>
                       </dependency>
                       <dependency>
                       <groupId>javax.faces</groupId>
                       <artifactId>jsf-api</artifactId>
                       <version>1.2_07</version>
                       </dependency>
                       <dependency>
                       <groupId>javax.faces</groupId>
                       <artifactId>jsf-impl</artifactId>
                       <version>1.2_07</version>
                       </dependency>
                       <dependency>
                       <groupId>javax.servlet</groupId>
                       <artifactId>servlet-api</artifactId>
                       <version>2.5</version>
                       <scope>provided</scope>
                       </dependency>
                       <dependency>
                       <groupId>javax.servlet</groupId>
                       <artifactId>jstl</artifactId>
                       <version>1.1.2</version>
                       </dependency>
                       <dependency>
                       <groupId>junit</groupId>
                       <artifactId>junit</artifactId>
                       <version>4.3</version>
                       <scope>test</scope>
                       </dependency>
                       <dependency>
                       <groupId>mysql</groupId>
                       <artifactId>mysql-connector-java</artifactId>
                       <version>5.0.5</version>
                       <scope>test</scope>
                       </dependency>
                       <dependency>
                       <groupId>org.hibernate</groupId>
                       <artifactId>hibernate-entitymanager</artifactId>
                       <version>3.2.0.ga</version>
                       </dependency>
                       <dependency>
                       <groupId>org.richfaces.ui</groupId>
                       <artifactId>richfaces-ui</artifactId>
                       <version>3.2.0.GA</version>
                       </dependency>
                       <dependency>
                       <groupId>taglibs</groupId>
                       <artifactId>standard</artifactId>
                       <version>1.1.2</version>
                       </dependency>
                      </dependencies>
                      


                      The jars that end up in WEB-INF/lib :

                      antlr-2.7.6.jar
                      asm-1.5.3.jar
                      asm-attrs-1.5.3.jar
                      cglib-2.1_3.jar
                      commons-beanutils-1.7.0.jar
                      commons-codec-1.3.jar
                      commons-collections-2.1.jar
                      commons-digester-1.8.jar
                      commons-logging-1.0.4.jar
                      dom4j-1.6.1.jar
                      ehcache-1.2.jar
                      hibernate-3.2.0.ga.jar
                      hibernate-annotations-3.2.0.ga.jar
                      hibernate-entitymanager-3.2.0.ga.jar
                      javassist-3.3.ga.jar
                      jboss-archive-browsing-5.0.0alpha-200607201-119.jar
                      jsf-api-1.2_07.jar
                      jsf-facelets-1.1.14.jar
                      jsf-impl-1.2_07.jar
                      jstl-1.1.2.jar
                      jta-1.0.1B.jar
                      log4j-1.2.8.jar
                      persistence-api-1.0.jar
                      richfaces-api-3.2.0.GA.jar
                      richfaces-impl-3.2.0.GA.jar
                      richfaces-ui-3.2.0.GA.jar
                      standard-1.1.2.jar


                      And additional jars in tomcat/lib :

                      log4j-1.2.14.jar
                      mysql-connector-java-5.0.5.jar


                      Thanks for the help.

                      • 9. Re: 3.2.0.GA - not working for me
                        Nick Belaevski Master

                        Could you please delete server log, run the server and then post the complete log somewhere?

                        • 10. Re: 3.2.0.GA - not working for me
                          Stephan Erlank Newbie

                          No problem, you can have a look at http://www.erlank.co.za/tomcat.log

                          I have set org.ajax4jsf and org.richfaces to debug level, everything else is info.

                          • 11. Re: 3.2.0.GA - not working for me
                            Nick Belaevski Master

                            Unfortunately nothing useful :( Could you please post your war file somewhere?

                            • 12. Re: 3.2.0.GA - not working for me
                              Stephan Erlank Newbie

                              Had a look at it again, seems the orginal exception was swallowed, turns out to be a NoClassDefFoundError.

                              Just had to include commons-collections-3.2 in my pom.xml.