《Springboot极简教程》问题解决:org.apache.catalina.LifecycleException: A child container failed during start

简介: 错误日志org.apache.catalina.LifecycleException: A child container failed during start原因分析项目依赖里面单独指定了servlet-api,类路径里面有多个版本servlet-api,导致类冲突 javax.

错误日志

org.apache.catalina.LifecycleException: A child container failed during start

原因分析

项目依赖里面单独指定了servlet-api,类路径里面有多个版本servlet-api,导致类冲突

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>${servlet-api-version}</version>
    <scope>provided</scope>
</dependency>

解决方案

在Springboot中,不要单独指定下面几个依赖的版本,默认使用Springboot的配置完的依赖即可:


   providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
    compile('javax.servlet:jstl')
    providedCompile('org.apache.tomcat.embed:tomcat-embed-jasper')

相关文章
|
2月前
|
Java 程序员 API
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
58 1
|
2月前
|
前端开发 Java 数据库连接
Springboot-MyBatis配置-配置端口号与服务路径(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-MyBatis配置-配置端口号与服务路径(idea社区版2023.1.4+apache-maven-3.9.3-bin)
33 0
|
20天前
|
Java
SpringBoot启动报错:org.apache.catalina.LifecycleException: Protocol handler start failed
SpringBoot启动报错:org.apache.catalina.LifecycleException: Protocol handler start failed
19 0
|
17天前
org.apache.catalina.LifecycleException: Protocol handler start failed
org.apache.catalina.LifecycleException: Protocol handler start failed
10 0
|
20天前
|
消息中间件 Kafka
org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
8 0
|
1月前
|
监控 NoSQL Java
Spring Boot集成Redis启动失败【Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.G】
Spring Boot集成Redis启动失败【Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.G】
|
5月前
|
Java Maven
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4
|
2月前
|
安全 前端开发 程序员
Springboot-EolinkApikit一键生成注释与一键上传API接口(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-EolinkApikit一键生成注释与一键上传API接口(idea社区版2023.1.4+apache-maven-3.9.3-bin)
18 0
|
2月前
|
Java API Maven
Springboot快速搭建跨域API接口(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot快速搭建跨域API接口(idea社区版2023.1.4+apache-maven-3.9.3-bin)
33 0
|
4月前
|
SQL 分布式计算 资源调度
[已解决]FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to
[已解决]FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to
122 0

推荐镜像

更多