1 Reply Latest reply on Jul 13, 2012 8:11 AM by Stephen Coy

    Jboss 7.0.2 deployment error in war

    Navin Maheshwari Newbie

      Hello,

      I am getting following error while deploying war file. I have removed jsf-impl.jar and jsf-api.jar from my WEB-INF/lib folder.

       

      jboss.deployment.unit."mifidbe.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "mifidbe.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

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

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

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

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

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_15]

      Caused by: java.lang.NoClassDefFoundError: javax/faces/component/UIComponent

          at java.lang.Class.getDeclaredConstructors0(Native Method) [:1.6.0_15]

          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [:1.6.0_15]

          at java.lang.Class.getConstructor0(Class.java:2699) [:1.6.0_15]

          at java.lang.Class.getConstructor(Class.java:1657) [:1.6.0_15]

          at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:105)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

       

      If I add jsf-api.jar WEB-INF/lib folder then following error is comming

       

      4:35:41,969 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/mifidbe]] (MSC service thread 1-3) No Spring WebApplicationInitializer types detected on classpath

      14:35:43,040 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/mifidbe]] (MSC service thread 1-3) StandardWrapper.Throwable: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory

          at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:725) [jsf-api.jar:]

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

          at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164) [jsf-api.jar:]

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

       

      Please help in resolving this error. this is my web.xml entry

      <servlet>

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

              <servlet-class>javax.faces.webapp.FacesServlet

              </servlet-class>

              <load-on-startup>1</load-on-startup>

          </servlet>

       

      And jboss provide module has jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar file in jboss-as-web-7.0.2.Final\modules\javax\faces\api\main folder. Is this causing any issue?