I had deployed the ear in JBoss which consists of few war (Web Archive). Basically the deployed ear file was built by ant by setting TOMCAT_HOME prior to start the ant build.
set TOMCAT_HOME=C:\apache-tomcat-6.0.32
I'm getting following error. I deployed it in JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21)
11:38:34,340 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.IllegalArgumentException: JBWEB000250: Child container with name already exists
Caused by: java.lang.IllegalArgumentException: JBWEB000250: Child container with name already exists at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:794) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:353) at org.jboss.as.web.deployment.WebContextInjector.inject(WebContextInjector.java:62) at org.jboss.as.web.deployment.WebContextInjector.inject(WebContextInjector.java:38) at org.jboss.msc.inject.CastingInjector.inject(CastingInjector.java:55) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1704) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:52) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1949) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1908) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] ... 3 more
This project is a legacy project. It has Struts 1.2.9, Springs-2.0.8, Hibernate-3.2.6 jar files in project lib directory and configurations for the same are available under \WEB-INF\ of Web Archives (.war).
Basically I am porting the Application from Websphere to JBoss
How can I solve or overcome this issue.
In standalone.xml this will be true enable-welcome-root
. If you make it false you can deploy a web archive .war
in the /
context....
If enable-welcome-root
remains true, then some default jboss web page comes. Hence this needs to be corrected to deploy a web application in /
context.
<subsystem xmlns="urn:jboss:domain:web:2.1" 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>
This problem occurs because of occurrence of same .war file in both .ear file as well as inside of some .war file.
In my case .war has a recurrence as a jars with the same name of some .war files under one .war\WEB-INF\lib. And those .jar's has everything replicated except web
folder removed. I hope this has been done to refer some java files across. NOW, I had removed those .jars. And now I am not getting this specific error.
So, for now, I sorted out this error JBWEB000250: Child container with name already exists..
There is nothing harm in building ant targets by setting TOMCAT_HOME.
But it may have some implications as Web Container varies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With