ContainerBase.addChild: 报错start:Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/XXXX]]
本来好好的一个项目,突然在Eclipse和MyEclipse,启动Tomcat,项目就报了错误,我把重点提示,粘贴如下:
严重:
ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/XXXX]]
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
严重: Error deploying web application directory [D:\Program Files\apache-tomcat-8.5.47\webapps\Ebuy]
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/XXXX]]
试了一下,在web.xml文件里的标签后面,即
<display-name>XXXX</display-name>
后加上
<absolute-ordering />
变成
<display-name>XXXX</display-name>
<absolute-ordering />
再启动Tomcat,启动成功,问题解决!
和大家分享一下,如果大家觉得能帮助到大家,可以关注一波哈!