这应该是每个人在部署时都将面临的非常普遍的问题。如果您在(.war)上下文下部署web归档文件,则会失败。
JBoss控制台中的错误如下,
内部服务器错误{“结果”“=>”失败“,”失败-描述“=> {"JBAS014671:失败服务”=> {“jboss.web.Deploment.default-host./”=> "org.jboss.msc.service.StartException中的服务jboss.web.Deploment.default-host。/:未能启动服务,原因是: java.lang.IllegalArgumentException: JBWEB000250:带名称的子容器“}}”,“回滚”=> true }
出现此问题的原因是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>发布于 2015-06-08 05:04:30
为了解决这个问题,
enable-welcome-root="true"被制作成"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>https://stackoverflow.com/questions/30701533
复制相似问题