Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.0.0-ga1, 3.1.0-ga1
-
Component/s: demos
-
Labels:None
-
Similar Issues:
Description
In versions of JBoss AS older than 7.0, it used to be required to have a WEB-INF/jboss-web.xml descriptor:
<?xml version="1.0"?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd"> <jboss-web> <resource-ref> <res-ref-name>mail/MailSession</res-ref-name> <jndi-name>mail/MailSession</jndi-name> </resource-ref> </jboss-web>
And also have the following entries in the WEB-INF/web.xml descriptor:
<listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <resource-ref> <res-ref-name>mail/MailSession</res-ref-name> <res-type>javax.mail.Session</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>
However when deployed with JBoss AS 7.0.x, the following stacktrace and console output appears:
18:01:24,626 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC00001: Failed to start service jboss.deployment.unit."jsf2-portlet.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."jsf2-portlet.war".INSTALL: Failed to process phase INSTALL of deployment "jsf2-portlet.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_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_31] at java.lang.Thread.run(Thread.java:680) [:1.6.0_31] Caused by: org.jboss.msc.service.CircularDependencyException: Service jboss-as has a circular dependency at org.jboss.msc.service.ServiceContainerImpl.detectCircularity(ServiceContainerImpl.java:617) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceContainerImpl.detectCircularity(ServiceContainerImpl.java:588) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:562) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2211) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:202) at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:99) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final] ... 5 more 18:01:24,842 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "jsf2-portlet.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"jsf2-portlet.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jsf2-portlet.war\".INSTALL: Failed to process phase INSTALL of deployment \"jsf2-portlet.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet.ValidatorFactory missing [ jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet ]","jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet.Validator missing [ jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet ]"]} 18:01:24,851 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) Stopped deployment jsf2-portlet.war in 15ms 18:01:24,854 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"jsf2-portlet.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jsf2-portlet.war\".INSTALL: Failed to process phase INSTALL of deployment \"jsf2-portlet.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet.ValidatorFactory missing [ jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet ]","jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet.Validator missing [ jboss.naming.context.java.module.jsf2-portlet.jsf2-portlet ]"]}}}
The solution is to delete the WEB-INF/jboss-web.xml descriptor and to remove the aforementioned lines of markup from the WEB-INF/web.xml descriptor.

Note that applying this fix will potentially break
FACES-183.