XXX could not be redeployed because it could not be...

發佈項目的時候Myeclipse彈出一個錯誤:

    XXX could not be redeployed because it could not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running,which has locked one or more files.


解決辦法:

把項目中引用的jar文件重新加一遍就行了,基本原因就是以前的jar文件不存在了,但是項目信息中還有,即項目的.classpath文件中還有不存在的jar文件引用。

可以右鍵點項目名稱,選擇Properties,選擇Java Build Path,選擇Libraries,把所有項目中的jar都remove,然後再點"add jars",把項目中的jar文件都加進來,再次部署就正常了。

大不了刪除項目,重新創建項目,再把想要jar包加進來,然後重新部署項目,啓動,絕對能搞定!
發佈了8 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章