0 Replies Latest reply on May 24, 2012 11:09 AM by Sabarinath Selvaraj

    Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a ComponentConfig

    Sabarinath Selvaraj Newbie

      Here I used JSF 2.1+ RichFaces 4.2.2 + JBoss 7.1.1

       

      My web.xml is

       

      <?xml version="1.0"?>

       

      <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">

       

      <display-name>Greeter</display-name>

       

       

       

      <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>

       

       

       

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

       

      </servlet-mapping>

      <servlet-mapping>

       

         <servlet-name>Faces Servlet</servlet-name>

       

         <url-pattern>*.xhtml</url-pattern>

       

      </servlet-mapping>

       

       

       

      <login-config>

       

         <auth-method>BASIC</auth-method>

       

         </login-config>

        

         <welcome-file-list>

          <welcome-file>

                index.html

            </welcome-file>

          </welcome-file-list>

       

      </web-app>

       

       

      faces-config.xml is

       

      <?xml version='1.0' encoding='UTF-8'?>

       

      <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">

       

       

       

         <managed-bean>

       

            <description>UsernName Bean</description>

       

            <managed-bean-name>user</managed-bean-name>

       

            <managed-bean-class>demo.user</managed-bean-class>

       

            <managed-bean-scope>request</managed-bean-scope>

       

            <managed-property>

       

               <property-name>name</property-name>

       

               <property-class>java.lang.String</property-class>

       

               <value/>

       

            </managed-property>

       

         </managed-bean>

        

        

       

      </faces-config>

       

       

       

      Jar's under WEB-INF/lib :

       

      ajax4jsf-1.0.6.jar

      commons-beanutils-1.7.0.jar

      commons-collections-3.2.jar

      commons-digester-1.8.jar

      guava-11.0.2.jar

      jcl-over-slf4j-1.6.1.jar

      jhighlight-1.0.jar

      jsf-api.jar

      jsf-facelets.jar

      jsf-impl.jar

      oscache-2.4.jar

      richfaces-components-api-4.2.2.Final.jar

      richfaces-components-ui-4.2.2.Final.jar

      richfaces-core-api-4.2.2.Final.jar

      richfaces-core-impl-4.2.2.Final.jar

       

      My index.html is

       

      <html>

      <head>

          <meta content="text/html; charset=UTF-8" http-equiv="content-type" />

          <meta http-equiv="refresh" content="0; url=result.jsf" />

      </head>

       

      <body>

      </body>

      </html>

       

       

      Error ::

       

      17:34:11,435 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "RichFacesExample.war"

      17:34:13,872 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.GlassFishInjectionProvider:com.sun.enterprise.Injecti

      onManager' for service type 'com.sun.faces.spi.injectionprovider'

      17:34:13,874 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.Def

      aultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'

      17:34:13,876 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annota

      tion.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'

      17:34:14,538 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-7) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate

      definition has been ignored.

      17:34:14,542 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-7) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate

      definition has been ignored.

      17:34:14,591 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-7) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/RichFacesExample'

      17:34:15,534 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-7) Hibernate Validator 4.2.0.Final

      17:34:15,589 WARNING [javax.enterprise.resource.webcontainer.jsf.managedbean] (MSC service thread 1-7) JSF1074: Managed bean named 'a4j' has already been registered.  Replacing existing managed b

      ean class type org.ajax4jsf.framework.skin.VersionBean with org.richfaces.VersionBean.

      17:34:15,592 WARNING [javax.enterprise.resource.webcontainer.jsf.managedbean] (MSC service thread 1-7) JSF1074: Managed bean named 'a4jSkin' has already been registered.  Replacing existing manag

      ed bean class type org.ajax4jsf.framework.skin.SkinBean with org.richfaces.skin.SkinBean.

      17:34:16,078 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-7) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAI

      LED! Must have a Constructor that takes in a ComponentConfig

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_06]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_06]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]

      Caused by: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig

              at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:295) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.facelets.tag.AbstractTagLibrary.addComponent(AbstractTagLibrary.java:525) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.facelets.tag.TagLibraryImpl.putComponent(TagLibraryImpl.java:115) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:569) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:361) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:363) [jsf-impl-2.1.7-jbossorg-2.jar:]

              ... 9 more

      Caused by: java.lang.NoSuchMethodException: org.ajax4jsf.tag.AjaxSupportHandler.<init>(javax.faces.view.facelets.ComponentConfig)

              at java.lang.Class.getConstructor0(Class.java:2706) [rt.jar:1.6.0_06]

              at java.lang.Class.getConstructor(Class.java:1657) [rt.jar:1.6.0_06]

              at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:293) [jsf-impl-2.1.7-jbossorg-2.jar:]

              ... 16 more

       

      17:34:16,152 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/RichFacesExample]] (MSC service thread 1-7) Exception sending context initialized event to listener instanc

      e of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a Component

      Config

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_06]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_06]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]

      Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a ComponentConfig

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.7-jbossorg-2.jar:]

              ... 8 more

      Caused by: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig

              at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:295) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.facelets.tag.AbstractTagLibrary.addComponent(AbstractTagLibrary.java:525) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.facelets.tag.TagLibraryImpl.putComponent(TagLibraryImpl.java:115) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:569) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:361) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:363) [jsf-impl-2.1.7-jbossorg-2.jar:]

              ... 9 more

      Caused by: java.lang.NoSuchMethodException: org.ajax4jsf.tag.AjaxSupportHandler.<init>(javax.faces.view.facelets.ComponentConfig)

              at java.lang.Class.getConstructor0(Class.java:2706) [rt.jar:1.6.0_06]

              at java.lang.Class.getConstructor(Class.java:1657) [rt.jar:1.6.0_06]

              at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:293) [jsf-impl-2.1.7-jbossorg-2.jar:]

              ... 16 more

       

      17:34:16,245 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-7) Error listenerStart

      17:34:16,247 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-7) Context [/RichFacesExample] startup failed due to previous errors

      17:34:16,250 SEVERE [javax.faces] (MSC service thread 1-7) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to f

      ind backup.

      17:34:16,253 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-7) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateExcep

      tion: Could not find backup for factory javax.faces.application.ApplicationFactory.

              at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

              at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:131) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:328) [jsf-impl-2.1.7-jbossorg-2.jar:]

              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3489) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3999) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3917) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_06]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_06]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]

       

      17:34:16,302 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.web.deployment.default-host./RichFacesExample: org.jboss.msc.service.StartExceptio

      n in service jboss.web.deployment.default-host./RichFacesExample: JBAS018040: Failed to start context

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_06]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_06]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_06]

       

      17:34:16,525 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "RichFacesExample.war" was rolled back with failure message {"JBAS014671: Failed services

      " => {"jboss.web.deployment.default-host./RichFacesExample" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./RichFacesExample: JBAS018040: Failed to start co

      ntext"}}

      17:34:16,554 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment RichFacesExample.war in 29ms

      17:34:16,556 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./RichFacesExample: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./

      RichFacesExample: JBAS018040: Failed to start context

       

      17:34:16,562 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2

      " => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./RichFacesExample" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./RichFacesExamp

      le: JBAS018040: Failed to start context"}}}}

       

       

       

      Thanks

      Advance