Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]

霸气de小男生 提交于 2019-12-03 15:02:37

Looks like you have an incompatible version of Servlet API in ur classpath. This could have been as a dependencies to Jersey jars. Try pulling jersey starter from Spring boot starters.

org.springframework.boot : spring-boot-starter-jersey

This will bring the right version into your classpath.

My guess is you have to use the default ServletInitializer class that is provided within the Spring Boot Project template of Eclipse.

//SpringBootApplication.java
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringBootApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootApplication.class, args);
    }
}

//ServletInitializer.java
public class ServletInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SpringBootApplication.class);
    }

}

If you are not using ServletInitializer class as specified in Spring Boot Starter Project template, try to extend SpringBootServletInitializer from your App class

public class App extends SpringBootServletInitializer

Please check a similar answer here

For me, upgrading javax.servlet-api to 4.0.1 did the trick:

<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>4.0.1</version> </dependency>

I had the same issue, After commenting out the below it was fixed. One of the follwoing dependency was the culprit.

    <!--  dependency>
    <groupId>me.fhir</groupId>
    <artifactId>fhir</artifactId>
    <version>0.12.0-RELEASE</version>
</dependency-->
<!--  dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.8.8</version>
</dependency-->
<!-- dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.8.8</version>
</dependency-->
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!