Announcement Announcement Module
Collapse
No announcement yet.
Child container with name already exists Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Child container with name already exists

    Hi, with spring mvc 3.1 and jsp, when deployed my war file, it throws the following exception:

    21:43:55,756 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "TestSession-1.0.war"
    21:43:57,239 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: 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$StartT ask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_07]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:907) [rt.jar:1.6.0_07]
    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]
    Caused by: java.lang.IllegalArgumentException: Child container with name already exists
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:804)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:792)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:356)
    at org.jboss.as.web.deployment.WebContextInjector.inj ect(WebContextInjector.java:62)
    at org.jboss.as.web.deployment.WebContextInjector.inj ect(WebContextInjector.java:38)
    at org.jboss.msc.inject.CastingInjector.inject(Castin gInjector.java:55) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl.doInje ct(ServiceControllerImpl.java:1549) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl.access $1900(ServiceControllerImpl.java:49) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartT ask.performInjections(ServiceControllerImpl.java:1 780) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartT ask.run(ServiceControllerImpl.java:1741) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    ... 3 more

    21:43:57,446 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "TestSession-1.0.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service"}}
    21:43:57,495 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment TestSession-1.0.war in 48ms
    21:43:57,496 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
    JBAS014777: Services which 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

    21:43:57,497 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service"}}}}
    jsp:
    Code:
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <form:form  action="save" modelAttribute="multiPartFileUploadBean" method="post" >
                        
                        <c:if test="${not empty multiPartFileUploadBean}">
                            <spring:url value="/category/thumbnail/123" var="url" htmlEscape="true" />
                            <img alt="" src="${url}" />
                        </c:if>
                        <br>
                        <a href="#" onclick="openUploadImagePage()">click to popup</a> <br>
                        <input type=BUTTON value="Submit" name="mySubmit" onClick="submitform()">
            </form:form>
        </body>
    </html>
    Controller:

    Code:
     @Controller
    @SessionAttributes({"multiPartFileUploadBean"})
    public class TestController {
    
        private static final Logger logger = Logger.getLogger(TestController.class);
    
        
        @ModelAttribute("multiPartFileUploadBean")
        public MultiPartFileUploadBean createMultiPartFileUploadBean() {
            return new MultiPartFileUploadBean();
        }
     
     
        @RequestMapping(value = "/", method = RequestMethod.GET)
        public String home(
                @ModelAttribute("multiPartFileUploadBean") MultiPartFileUploadBean multiPartFileUploadBean, ModelMap model) {
            logger.debug(" =======HOME PAGE========");
            logger.debug(" =======multiPartFileUploadBean: ========"+multiPartFileUploadBean.toString());
            model.addAttribute("multiPartFileUploadBean", multiPartFileUploadBean);
            return "index";
        }
    MultiPartFileUploadBean.java:
    Code:
    import org.springframework.web.multipart.MultipartFile;
    
    public class MultiPartFileUploadBean implements java.io.Serializable
    {
        private List<MultipartFile> files;
    
        public void setFiles(List<MultipartFile> files) {
            this.files = files;
        }
    
        public List<MultipartFile> getFiles() {
            return files;
        }
    }
    Any suggestion is very appreciated.
    Thanks
    Sam
    Last edited by samsam007; Sep 25th, 2012, 08:17 AM.

  • #2
    Hi, I am happy to pay anyone whom can fix this error for me.
    I have had a simple project setup and ready to email to anyone my source code. Please reply to me if you are interested.

    Thanks
    Sam

    Comment

    Working...
    X