4 Replies Latest reply on Feb 21, 2017 5:05 PM by Nipuni Perera

    JBOSS-EAP 6.4 : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

    Nipuni Perera Newbie

      I am trying to deploy a web application I have used in Jboss-4.0.3 to Jboss EAP 6.4.

       

      I face the below error while starting the server:

       

      11:30:59,936 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 91) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_51]

        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.UnsupportedOperationException

        at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]

        at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:766) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:313) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

        ... 12 more

       

      I have 3 jars that I pack inside my.war/WEB-INF/lib that I think relate to jsf :

      1. myfaces-impl-1.1.5.jar

      2. myfaces-api-1.1.5.jar

      3. jstl-1.1.0.jar

       

      I have removed jstl-1.1.0.jar and  myfaces-api-1.1.5.jar jboss already has jsf jars in its environment. But I cannot remove myfaces-impl-1.1.5.jar from my application as I see "java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener" if I remove myfaces-impl-1.1.5.jar.

       

      I still see the same Configuration failed error mentioned above. How can I configure my application to resolve this issue? (I don't need to exclude jboss-jsf jars as I am using them in my application.)

       

      Thanks,

        • 1. Re: JBOSS-EAP 6.4 : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
          Anup Dey Apprentice

          Red Hat JBoss Enterprise Application Platform (EAP) includes a Java Server Faces (JSF) implementation. JSF is included in the Java EE specification.

           

          It is recommended to use the Java Server Faces (JSF) implementation that is contained in the application server, so removing the JSF you are packaging is the best option as packaging your own JSF implementation is a Java EE anti-pattern as the purpose of Java EE is to integrate these frameworks.

           

          In JBoss EAP 6.4.0 suports JSF: 1.2_15-b01-redhat-12 and JSF2 : 2.1.28.Final

           

          The error itself is telling that the it can not find myfaces class

          The ClassNotFoundException means that the mentioned class is missing in the application's runtime classpath. The mentioned class is part of MyFaces JSF implementation. You need to download the MyFaces Core Distribution, unpack the file and put the JAR files found in the /lib folder in the /WEB-INF/lib folder of your webapp project. Note that MyFaces ships with three myfaces-*.jar files, you should put either both the myfaces-api and myfaces-impl JAR files, or alone the myfaces-bundle JAR file in the /WEB-INF/lib.

           

          The appropriate jar(s) either need to be deployed with the WAR, or referenced as a module within JBoss. You can check out some of the documentation for JBoss EAP 6's module dependency configuration here: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/Add_an_Explicit_Module_Dependency_to_a_Deployment1.html

          • 2. Re: JBOSS-EAP 6.4 : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
            Nipuni Perera Newbie

            Thanks for the reply,

             

            I will explain my question more. I don't see any ClassNotFoundException when I have below list of jars in my server:

             

            asm-attrs.jar

            axis.jar

            cglib-2.1.3.jar

            commons-beanutils-1.7.0.jar

            commons-collections-3.1.jar

            commons-digester-1.6.jar

            commons-discovery-0.2.jar

            commons-el-1.0.jar

            commons-email-1.0.jar

            commons-fileupload-1.1.1.jar

            commons-httpclient-3.0.jar

            commons-lang-2.1.jar

            ehcache-1.2.3.jar

            my-project-broker-connector.jar

            my-project-common.jar

            my-project-insurer-connector.jar

            my-project-insurer-product-test.jar

            my-project-schema-1_0_0.jar

            itext-2.0.6.jar

            jaxrpc.jar

            myfaces-impl-1.1.5.jar

            parlinkie-msgsvr-connector-acord.jar

            parlinkie-msgsvr-connector-filesystem.jar

            parlinkie-msgsvr-control-panel.jar

            parlinkie-msgsvr-core.jar

            sqljdbc42.jar

            standard.jar

            tomahawk-1.1.5.jar

            xbean.jar

             

            What I see is error below (CONFIGURATION FAILED ! null) while starting the server (added the full stack trace of the error):

             

            09:55:24,079 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 116) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

              at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_51]

              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            Caused by: java.lang.UnsupportedOperationException

              at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:766) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:313) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              ... 12 more

             

             

            09:55:24,369 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/iclose-messenger-combined]] (ServerService Thread Pool -- 116) JBWEB000287: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:276) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

              at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_51]

              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              ... 11 more

            Caused by: java.lang.UnsupportedOperationException

              at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar:2.1.28.Final-redhat-1]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:766) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:313) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.28.redhat-8.jar:2.1.28.redhat-8]

              ... 12 more

             

            I don't see any JSF jars in my application. I need to resolve the *Configuration failed error* mentioned above. How can I configure my application to resolve this issue?

             

            Thanks,

            Nipuni

            • 3. Re: JBOSS-EAP 6.4 : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
              Anup Dey Apprentice

              Hi,

               

              It looks like you might be including some JSF API or JSF Implementation jar inside your application, which might be causing the configuration failure due to conflict.

               

              If you are packaging any JSF related jar inside your  "my.war/WEB-INF/lib" then remove it and then test again.

               

               

              Still if you face any issue then please share the list of JARs present inside your application. Looks like you are using JBoss EAP 6.4 which includes the JSF jars on its own as following so if you are trying to package your own jsf then it is not needed until you want your own version of jsf.

               

              $JBOSS_HOME/modules/system/layers/base/javax/faces/api/1.2/jsf-api-1.2.15.b01-redhat-12.jar

              $JBOSS_HOME/modules/system/layers/base/javax/faces/api/main/jboss-jsf-api_2.1_spec-2.1.28.Final-redhat-1.jar

               

              NOTE: JBoss EAP 6.4 uses JSF 2.1.28 as default. So please check if your application or the jars which you are using in your application are compatible to it or not.   (EAP 6.4 also ships a separate slot containing the JSF 1.2 api as well as mentioned above)

               

               

              The JSF dependencies are available to all the applications deployed on EAP6 by default, So you do not need to include those Jars inside the application.

              Rather than adding the JAR inside the application you could have simply removed the JSF jars which were present in your old application.

               

              As JBoss EAP 6.4 will by default offer JSF 2.1 jars for the applications hence If your application needs JSF 1.2 version only then you could add the following kind of "jboss-deployment-structure.xml" inside your application "my.war/WEB-INF"

               

              ~~~

              <jboss-deployment-structure> 

                 <deployment> 

                      <exclusions> 

                        <module name="javax.faces.api" slot="main"/> 

                        <module name="com.sun.jsf-impl" slot="main"/> 

                      </exclusions> 

                      <dependencies> 

                        <module name="javax.faces.api" slot="1.2" export="true"/> 

                        <module name="com.sun.jsf-impl" slot="1.2" export="true"/> 

                      </dependencies> 

                  </deployment> 

              </jboss-deployment-structure>

              ~~~

              • 4. Re: JBOSS-EAP 6.4 : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
                Nipuni Perera Newbie

                Hi Anup,

                Please see my comments inline:

                 

                "If you are packaging any JSF related jar inside your  "my.war/WEB-INF/lib" then remove it and then test again."

                -- I had below jars in my application and I removed them.

                   1. myfaces-api-1.1.5.jar

                   2. jstl-1.1.0.jar

                --- I also has myfaces-impl-1.1.5.jar which is a jsf implementation. But I cannot remove this (myfaces-impl-1.1.5.jar) from my application, because I see "java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener" if I remove myfaces-impl-1.1.5.jar. Let me know if jboss has a jsf implementation that i can use instead of myfaces-impl-1.1.5.jar.

                 

                "Still if you face any issue then please share the list of JARs present inside your application"

                -- I did listed the jars I am using inside my application in my previous reply. I am listing them again below for your reference:

                asm-attrs.jar

                axis.jar

                cglib-2.1.3.jar

                commons-beanutils-1.7.0.jar

                commons-collections-3.1.jar

                commons-digester-1.6.jar

                commons-discovery-0.2.jar

                commons-el-1.0.jar

                commons-email-1.0.jar

                commons-fileupload-1.1.1.jar

                commons-httpclient-3.0.jar

                commons-lang-2.1.jar

                ehcache-1.2.3.jar

                my-project-broker-connector.jar

                my-project-common.jar

                my-project-insurer-connector.jar

                my-project-insurer-product-test.jar

                my-project-schema-1_0_0.jar

                itext-2.0.6.jar

                jaxrpc.jar

                myfaces-impl-1.1.5.jar

                parlinkie-msgsvr-connector-acord.jar

                parlinkie-msgsvr-connector-filesystem.jar

                parlinkie-msgsvr-control-panel.jar

                parlinkie-msgsvr-core.jar

                sqljdbc42.jar

                standard.jar

                tomahawk-1.1.5.jar

                xbean.jar