1. 程式人生 > >An internal error occurred during: "Loading descriptor for pro-test.".

An internal error occurred during: "Loading descriptor for pro-test.".

在執行Maven Update的時候,提示以下錯誤:
An error has occurred. See error log for more details.
詳細錯誤:
An error has occurred. See error log for more details.
java.lang.NullPointerException

重新啟動Eclipse之後提示以下兩個錯誤:
An internal error occurred during: “Loading descriptor for pro-test.”.
org.xml.sax.SAXParseExceptionpublicId: platform:/resource/pro-test/src/main/webapp/WEB-INF/web.xml;

systemId: platform:/resource/pro-test/src/main/webapp/WEB-INF/web.xml;

lineNumber: 1; columnNumber: 39; 檔案提前結束。

這裡寫圖片描述

這裡寫圖片描述

很奇怪,web.xml中只有一行,為什麼會報錯!

<?xml version="1.0" encoding="UTF-8"?>

解決方案

刪除web.xml檔案,錯誤消失。

再重新建立web.xml檔案,還是相同的內容,再執行 Maven Update也沒有重現此錯誤!