最近將以前寫的項目重新導入進Eclipse調試啓動時出現報錯:Failed to start component [StandardEngine[Catalina].StandardHost[localhost]。
網上查找出來的原因有:
1. web.xml文件的錯誤,某處的單詞可能拼錯等錯誤導致web.xml解析錯誤。
2. jdk版本和tomcat版本的不對應。
3. jar包的丟失或者版本不對應。
我逐步檢查了我的項目,三個原因全部都排除,在糾結了很久之後,終於在網上找到一篇帖子,說到maven項目的問題,需要將maven的本地repository刪除重新下載,建議使用國內的倉庫鏡像。
1. 修改maven setting.xml中的鏡像地址(阿里鏡像,建議修改到國內)
1 <mirror>
2 <id>alimaven</id>
3 <mirrorOf>central</mirrorOf>
4 <name>aliyun maven</name>
5 <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
6 </mirror>