Reputation: 753
This should be the very common problem that everyone will be facing while deployment. You will be failing if you deploy a web archive (.war)
under /
context.
The error in JBoss console will be like this,
Internal Server Error { "outcome" => "failed", "failure-description" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service Caused by: java.lang.IllegalArgumentException: JBWEB000250: Child container with name already exists"}}, "rolled-back" => true }
The problem comes because of the following configuration in standalone.xml
<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
Upvotes: 3
Views: 26212
Reputation: 753
To fix this,
enable-welcome-root="true"
to be made "false"
<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
Upvotes: 6