Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] 错误(Day_25)
- 错误: 在maven项目,web启动的时候报这个错误
Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]

- 错误原因:
maven插件当中提供了servlet的jar包。但我们web当中又自己提供了servlet包。
因为我们没有指定我们自己包的运行范围,默认在整个期间都生效、此时就会造成俩个包的冲突
所需要在自己包指定运行范围 : <scope> provided </scope>
- 解决方法是:
指定自己JAR包作用域为 provided

- 此外,一个优秀的程序员在遇到错误后不仅要解决错误,更要学会扩展错误
关于maven依赖中的scope的作用和用法:
scope中的值常见可分为:
- test
test范围指的是测试范围有效,在编译和打包时都不会使用这个依赖
- compile
compile范围指的是编译范围有效,在编译和打包时都会将依赖存储进去
- provided
provided依赖:在编译和测试的过程有效,最后生成war包时不会加入,诸如:servlet-api,因为servlet-api,tomcat等web服务器已经存在了,如果再打包会冲突
- runtime
runntime:仅仅适用于运行环境,在编译和测试环境下都不会被使用
Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] 错误(Day_25)的更多相关文章
- maven运行出现错误:Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]](xjl456852原创)
maven在使用tomcat插件tomcat7-maven-plugin:2.2:run运行项目,出现下面错误: 严重: A child container failed during start j ...
- Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
今天在测试项目代码时,在idea中配置tomcat7插件运行后一直报如下错误: 解决方案:看了网上大多数办法都是修改xml文件配置,感觉并不适用,最后看到比较靠谱解释如下: pom.xml中jar包发 ...
- Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/***]]
问题描述:Tomcat容器和Eclipse启动运行时候报错 Failed to start component [StandardEngine[Catalina].StandardHost[local ...
- Tomcat启动时报错,Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext
05-Dec-2016 11:23:44.321 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addCh ...
- Tomcat报错: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]]
Tomcat报错:严重: A child container failed during startjava.util.concurrent.ExecutionException: org.apach ...
- tomcat启动时出现了Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]等错误
tomcat 启动时报错:Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]等错误 解决办法: 是 ...
- tomcat应用org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常的根本原因
早上,有个应用又挂了,客户端打开时报404,看进程是还在的.倒回第一次异常的地方,可见catalina.out中有如下信息: 08:46:56.646 [ContainerBackgroundProc ...
- IntelliJ IDEA启动spring boot项目出现Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
IntelliJ IDEA启动spring boot项目出现Failed to start component [StandardEngine[Tomcat].StandardHost[localho ...
- sprigboot 异常 Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].Tomc...
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com ...
随机推荐
- Go-26-Json
JSON(JavaScript Object Notation,JavaScript对象表示法)是一种轻量级的数据交换格式,因简单.可读性强被广泛使用. Go的标准包encoding/json对JSO ...
- Tony老师带你来看Java设计模式:代理模式
目录 定义 作用 意图 主要解决问题 优缺点 与装饰者模式的区别 结构 从Tony老师来看实现方式 静态代理 动态代理 JDK动态代理的实现 cglib动态代理的实现 定义 为其他对象提供一种代理来控 ...
- Salesforce学习之路(七)Visualforce结合Reports展示图表
Salesforce作为一款CRM系统,个人觉得最重要的环境便是在于数据的展示和联动,而Salesforce也本身提供了相当强大的功能,Report在展示图表的方面十分强大,前段时间更是宣布以157亿 ...
- hdu4685 最大匹配可能性
题意: 给你n个王子和m个公主,每个王子可以和自己喜欢的公主结婚,问你在不影响最大匹配的前提下每个王子都可以去哪些公主. 思路: 所有王子向他喜欢的公主连一条边,然后匹配一遍, ...
- PAT 乙级 -- 1012 -- 数字分类
题目简介 给定一系列正整数,请按要求对数字进行分类,并输出以下5个数字: A1 = 能被5整除的数字中所有偶数的和: A2 = 将被5除后余1的数字按给出顺序进行交错求和,即计算n1-n2+n3-n4 ...
- C#-几个STL相关
C#结构体排序 1................................................. 声明 struct data { public string A; public ...
- HackingLab脚本关
目录 1:key又又找不到了 2:快速口算 3:这个题目是空的 5:逗比验证码第一期 6:逗比验证码第二期 7:逗比的验证码第三期(SESSION) 8:微笑一下就能过关了 9:逗比的手机验证码 10 ...
- 『动善时』JMeter基础 — 8、JMeter主要元件介绍
目录 1.测试计划(Test Plan) 2.线程组 3.取样器(sampler) 4.逻辑控制器(Logic Controller) 5.配置元件(Config Element) 6.定时器(Tim ...
- 【python】Leetcode每日一题-寻找旋转排序数组中的最小元素
[python]Leetcode每日一题-寻找旋转排序数组中的最小元素 [题目描述] 已知一个长度为 n 的数组,预先按照升序排列,经由 1 到 n 次 旋转 后,得到输入数组.例如,原数组nums ...
- Day004 while和do-while循环
循环结构(while和do-while) while循环 do...while循环 for循环 在Java5中引入了一种主要用于数据的增强for循环 //输出1~100 int i=0; while ...