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包加進來,然後重新部署項目,啓動,絕對能搞定!