2 Replies Latest reply on Jan 11, 2016 6:28 AM by Siva P

    Critical error during deployment: : java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider

    Siva P Master

      hi,

       

      I am getting the below error while starting the Jboss Eap 6.2.0.GA

       

      Using RF: 4.5.12 version

      JSF: 2.2.12 Version

      JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) starting.....

      16:53:58,496 INFO  [org.jboss.seam.Component] (ServerService Thread Pool -- 69) Component: org.jboss.seam.web.session, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.web.Session

      16:53:58,497 INFO  [org.jboss.seam.Component] (ServerService Thread Pool -- 69) Component: org.jboss.seam.web.userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.faces.UserPrincipal

      16:53:58,499 INFO  [org.jboss.seam.Component] (ServerService Thread Pool -- 69) Component: reporting, scope: CONVERSATION, type: JAVA_BEAN, class: com.bosch.wcms.simplereporting.session.Reporting

      16:53:58,506 INFO  [org.jboss.seam.Component] (ServerService Thread Pool -- 69) Component: securityRules, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.drools.RuleBase

      16:53:58,508 INFO  [org.jboss.seam.Component] (ServerService Thread Pool -- 69) Component: sharedComponent, scope: APPLICATION, type: JAVA_BEAN, class: com.bosch.wcms.simplereporting.common.SharedComponent

      16:53:58,520 WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] (ServerService Thread Pool -- 69) no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.

      16:53:58,630 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 69) Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/SimpleReporting'

      16:54:00,102 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (ServerService Thread Pool -- 69) JSF1030: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' cannot be loaded.

      16:54:00,102 INFO  [javax.enterprise.resource.webcontainer.jsf.application] (ServerService Thread Pool -- 69) JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

      16:54:00,162 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 69) Critical error during deployment: : java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider

          at javax.faces.FactoryFinderInstance.copyInjectionProviderFromFacesContext(FactoryFinderInstance.java:174) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinderInstance.<init>(FactoryFinderInstance.java:157) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:150) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:91) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinder.setFactory(FactoryFinder.java:310) [jsf-api-2.2.12.jar:2.2]

          at com.sun.faces.config.processor.FactoryConfigProcessor.setFactory(FactoryConfigProcessor.java:317) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:259) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:216) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227) [jsf-impl-2.2.12.jar:2.2.12]

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

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

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_32]

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

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

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]

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

      Caused by: java.lang.ClassNotFoundException: com.sun.faces.spi.InjectionProvider from [Module "javax.faces.api:2.2.12" from local module loader @175078b (finder: local module finder @42552c (roots: C:\Siva\openJava-1205\jboss-eap-6.2.0\jboss-eap-6.2\modules,C:\Siva\openJava-1205\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          ... 22 more

       

      16:54:00,173 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SimpleReporting]] (ServerService Thread Pool -- 69) JBWEB000287: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider

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

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

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

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_32]

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

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

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]

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

      Caused by: java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider

          at javax.faces.FactoryFinderInstance.copyInjectionProviderFromFacesContext(FactoryFinderInstance.java:174) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinderInstance.<init>(FactoryFinderInstance.java:157) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:150) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:91) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinder.setFactory(FactoryFinder.java:310) [jsf-api-2.2.12.jar:2.2]

          at com.sun.faces.config.processor.FactoryConfigProcessor.setFactory(FactoryConfigProcessor.java:317) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:259) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:216) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227) [jsf-impl-2.2.12.jar:2.2.12]

          ... 12 more

      Caused by: java.lang.ClassNotFoundException: com.sun.faces.spi.InjectionProvider from [Module "javax.faces.api:2.2.12" from local module loader @175078b (finder: local module finder @42552c (roots: C:\Siva\openJava-1205\jboss-eap-6.2.0\jboss-eap-6.2\modules,C:\Siva\openJava-1205\jboss-eap-6.2.0\jboss-eap-6.2\modules\system\layers\base))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

          ... 22 more

       

      16:54:00,176 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 69) JBWEB001103: Error detected during context /SimpleReporting start, will stop it

      16:54:00,178 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SimpleReporting]] (ServerService Thread Pool -- 69) JBWEB000306: Exception sending context destroyed event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider

          at javax.faces.FactoryFinderInstance.copyInjectionProviderFromFacesContext(FactoryFinderInstance.java:174) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinderInstance.<init>(FactoryFinderInstance.java:157) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:150) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.CurrentThreadToServletContext.getApplicationFactoryManager(CurrentThreadToServletContext.java:91) [jsf-api-2.2.12.jar:2.2]

          at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:279) [jsf-api-2.2.12.jar:2.2]

          at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:140) [jsf-impl-2.2.12.jar:2.2.12]

          at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:343) [jsf-impl-2.2.12.jar:2.2.12]

          at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3427) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

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

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_32]

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

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

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]

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

       

      16:54:00,183 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 69) MSC000001: Failed to start service jboss.web.deployment.default-host./SimpleReporting: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./SimpleReporting: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_32]

          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_32]

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

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

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]

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

      Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)

          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)

          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)

          ... 7 more

       

      16:54:00,431 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Deployed "SimpleReporting.war" (runtime-name : "SimpleReporting.war")

      16:54:00,433 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./SimpleReporting: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./SimpleReporting: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

       

      16:54:00,506 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

      16:54:00,506 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

      16:54:00,506 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started (with errors) in 28664ms - Started 314 of 377 services (2 services failed or missing dependencies, 59 services are passive or on-demand)

       

       

       

      jboss-deployment-structure.xml:

      <jboss-deployment-structure >

          <deployment>

      <!--                 <exclude-subsystems>

                  <subsystem name="jsf" />

              </exclude-subsystems>     -->      

              <exclusions>

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

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

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

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

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

                 <module name="org.jboss.as.jsf-injection" slot="1.2"/> -->          

              </exclusions>

              <dependencies>

                  <module name="org.dom4j" export="true" />

                  <module name="org.apache.commons.logging" />

                  <module name="org.apache.commons.collections" export="true" />

                  <module name="org.apache.log4j" />          

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

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

                  <module name="javax.el.api" export="true"/>

                  <module name="javax.servlet.api" export="true"/>

                  <module name="javax.servlet.jsp.api" export="true"/>

                  <module name="javax.servlet.jstl.api" export="true"/>

                  <module name="javax.validation.api" export="true"/>

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

                  <module name="org.jboss.as.jsf-injection" slot="main"/> -->

                  <system export="true">

                      <paths>

                          <path name="sun/net/util"/>

                      </paths>

                  </system>

              </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      Web.xml:

       

      <!-- JSF 2: this tells JBoss 5 to use the jsf jars included in the app -->

          <context-param>

             <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

             <param-value>true</param-value>

          </context-param>

        

          <!-- JSF 2: this needs to be included to avoid an error message -->

          <context-param>

             <param-name>com.sun.faces.injectionProvider</param-name>

             <param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value>

          </context-param>

      Why this error is occuring and how to resolve it.Its a custom JSF Bundle Implementation.