ContainerBase.addChild: 報錯start:Failed to start component [StandardEngine[Catalina].StandardHost

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,啓動成功,問題解決!
和大家分享一下,如果大家覺得能幫助到大家,可以關注一波哈!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章