maven使用tomcat插件出现Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during startd错误

当使用IDEA搭建springmvc项目时,使用maven集成的tomcat插件运行项目时,如果出现以下错误:

[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project allenmvc: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during start -> [Help 1]

可以作如下设置:

    <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
    <scope>provided</scope>
</dependency>
posted @ 2021-01-10 16:20  Java民工陆小凤  阅读(540)  评论(0编辑  收藏  举报