SEVERE: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start error SEVERE: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start error java java

SEVERE: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start error


Got the solution for this problem.... Wooo

  1. Make sure that Appliction server (Tomcat etc.) uses the same java runtime version as per what your java application is using.

  2. Make sure that your using jre path not jdk path for the runtime enviroments

  3. Make sure when creating a project select the appropriate server runtime versions.


This issue arises because of different reasons. It might encountered if you are using Spring boot built war file. As Spring boot web and rest starter projects jars do have embedded Tomcat in it, hence fails with "SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException".

You can fix this by exclusion of the embedded tomcat at the time of packaging by using exclusions in case of maven.

Maven dependency of "spring-boot-starter-web" will look like

   <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>        <exclusions>            <exclusion>                <groupId>org.springframework.boot</groupId>                <artifactId>spring-boot-starter-tomcat</artifactId>            </exclusion>        </exclusions>    </dependency>


According to me, this would happen if there are two offending classes of same name but with different version. Usually, it happens due to servlet-api.jar.If its present in lib folder of your war, then pls remove it using whichever tool used for building war. Or in case of maven, add the dependency with scope specified as "provided". This will solve the compilation issue and at run time it will refer to jar provided by server environment.Pls configure the dependency as follows:

<dependency>        <groupId>javax.servlet</groupId>        <artifactId>javax.servlet-api</artifactId>        <version>3.0.1</version>        <scope>provided</scope></dependency>