0 Replies Latest reply on Jun 26, 2012 9:35 PM by billreed

    JBoss 7 and MyFaces 2, war deployment works but ear deployment doesn't

    billreed

      Hi,

       

      My application deploys and runs correctly but only if it's deployed as a war. When the war is put into an ear, the exception shown below happens. The application includes the MyFaces 2.0.x api and impl jars in the WEB-INF/lib and along with setting WAR_BUNDLES_JSF_IMPL in web.xml, everything is fine as long as the deployed file is a war. The ear just contains the war plus the META-INF that contains the application.xml with the war module defined.

       

      The class not being found (below) is referenced from the JBoss supplied JSF Mojarra impl (it's the listener-class defined in Mojarra's jsf_core.tld). It appears that ear deployment attempts to create an instance of this class whereas war deployment doesn't.

       

      Is there a way to not have ear deployment attempt to initilize the supplied Mojarra impl? I've also tried various ways to remove the depedency to the supplied Mojarra module, but this always leads to other exceptions that prevent JBoss from starting up. I get the same results with both JBoss 7.0.2 and 7.1.1.

       

      Thanks,

      Bill

      -------

       

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."Test.ear"."Test.war".INSTALL: org.jboss.msc.service.StartException in servicejboss.deployment.subunit."Test.ear"."Test.war".INSTALL: Failed to process phase INSTALL of subdeployment "Test.war" of deployment "Test.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

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

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

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

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

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

      Caused by: java.lang.RuntimeException: Failed to load class com.sun.faces.config.ConfigureListener

              at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:141)

              at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:122)

              at org.jboss.as.ee.component.LazyValue.get(LazyValue.java:40)

              at org.jboss.as.ee.component.EEApplicationDescription.getClassConfiguration(EEApplicationDescription.java:183)

              at org.jboss.as.ee.component.ComponentDescription.createConfiguration(ComponentDescription.java:153)

              at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:70)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

              ... 5 more

      Caused by: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener from [Module "deployment.Test.ear.Test.war:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)

              at java.lang.Class.forName0(Native Method) [:1.6.0_32]

              at java.lang.Class.forName(Class.java:247) [:1.6.0_32]

              at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:139)

              ... 11 more