Spring Boot - can't start with embedded tomcat error

后端 未结 4 1294
执笔经年
执笔经年 2021-02-20 04:18

pom.xml

    
        org.springframework.boot
        spring-boot-starter-parent

        
相关标签:
4条回答
  • 2021-02-20 04:36

    I had the same problem, it seems that:

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.9.0</version>
    </dependency>
    

    had dependency to jackson-annotations in version 2.8.0 which crashed somehow with my other jackson dependencies.

    after modifying the dependency as follows:

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <exclusions>
            <exclusion>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    

    and adding explicit dependency on:

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.9.0</version>
    </dependency>
    

    problem was solved for me :)

    0 讨论(0)
  • 2021-02-20 04:43

    In my case, a rebuilding from IntelliJ worked. I changed the active profile, which should require a full rebuilding.

    0 讨论(0)
  • 2021-02-20 04:51

    2020-09-27T20:14:09.765263+00:00 app[web.1]: Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start

    2020-09-27T20:14:09.765264+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:187) ~[spring-boot-2.3.4.RELEASE.jar!/:2.3.4.RELEASE]

    2020-09-27T20:14:09.765270+00:00 app[web.1]: at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.3.4.RELEASE.jar!/:2.3.4.RELEASE]

    2020-09-27T20:14:09.765270+00:00 app[web.1]: ... 22 common frames omitted

    2020-09-27T20:14:09.765270+00:00 app[web.1]:

    2020-09-27T20:14:09.845682+00:00 heroku[web.1]: Process exited with status 1

    0 讨论(0)
  • 2021-02-20 04:54

    Add this dependency to your pom.xml.

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>
    

    Tomcat dependency (spring-boot-starter-tomcat) is not required as it is already inbuilt with "spring-boot-starter-web"

    0 讨论(0)
提交回复
热议问题