2012-03-09 45 views
19

我在用於測試Web應用程序的eclipse(helios)環境中安裝了Tomcat v7.0服務器。目前我在我的工作區中有一個正確加載到服務器中的struts Web應用程序,以及兩個我試圖上傳的動態Web項目。主要是一個簡單的類,我想爲第一個項目創建axis2的Web服務,併爲第二個項目創建一個簡單的html頁面(用於測試此問題)。爲什麼我的發佈在Tomcat v7.0服務器上因爲另一個進程鎖定而失敗?

但是,沒有一個在服務器內正確加載,並且我看到由另一個進程錯誤導致的鎖定。

服務器控制檯給出的錯誤是:

Publishing failed with multiple errors 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\activation-1.1.jar. May be locked by another process. 

Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\antlr-2.7.7.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axiom-api-1.2.11.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axiom-dom-1.2.11.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axiom-impl-1.2.11.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-adb-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-adb-codegen-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-ant-plugin-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-clustering-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-codegen-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-corba-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-fastinfoset-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-java2wsdl-1.6.0.jar. May be locked by another process. 
Could not delete C:\Documents and Settings\xgeneric\workspaceSkillInventory\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\WStest3\WEB-INF\lib\axis2-jaxbri-1.6.0.jar. May be locked by another process. 

...等

已經有人已經遇到了這個問題,一個解決方案的瞭解?

+0

您可以調查哪個進程正在鎖定這些文件並從那裏深入挖掘。在Windows上,我使用解鎖器(http://www.filehippo.com/download_unlocker/) – 2012-03-09 11:45:58

+0

是的,我想過,但我不知道你建議的那個工具。無論如何,重新啓動解決了這個問題(顯然)。不是真正的問題,但這是另一個故事... :) – Th0rndike 2012-03-09 13:11:01

+1

我有同樣的問題。你有沒有找到解決方案? – Bob 2012-03-15 21:30:40

回答

7

我完全忘記了這個問題。其實,問題出在其他地方,爲了解決「鎖定」問題,我只能重新啓動電腦。然後我還有其他問題,但這不涉及這個問題。

+1

我可以通過使用-clean選項啓動eclipse而不是重新啓動計算機來修復類似問題。 – 2013-11-07 18:56:57

2

我有同樣的問題。 我通過多次在服務器上進行清理解決了這個問題。每次我乾淨的時候,不同的圖書館都被鎖定,直到最後所有人都被解鎖。 我希望它有幫助!

+0

只是重新啓動可能會更快,但它的聲音。 – 2012-09-23 04:41:36

+0

我試圖重新啓動,但它沒有幫助。服務器上的幾個乾淨的命令解決了我的情況 – Reconquistador 2017-06-06 04:20:32

7
  1. 在控制檯窗口中,您可以找到堆棧跟蹤,只需從控制檯切換到服務器(或從窗口 - >顯示視圖 - >服務器顯示它)。
  2. 雙擊你的tomcat服務器,它會打開tomcat的概述。你會發現兩個標籤(在窗口的底部)。概述和模塊
  3. 點擊模塊。你會發現那裏列出的項目。
  4. 刪除所有項目並清理服務器(右鍵單擊服務器名稱 - >清理)。

嘗試重新啓動服務器,它將開始工作,因爲它爲我工作。

32

1-停止服務器
2-清潔服務器
3-清潔Tomcat的工作目錄... enter image description here

+0

在執行這些步驟之前,我還必須從導致錯誤的模塊中「清理模塊工作目錄」。使用Tomcat v8.0和Eclipse 4.5.1 – JeffryHouser 2016-05-06 15:24:43

+0

該解決方案沒有解決我的問題,但我激活了自動刷新選項(窗口 - >首選項 - >工作區)並解決了我的問題 – PurpleSoft 2017-04-25 07:14:14

1

我面臨同樣的問題;從TomCat服務器刪除模塊解決了這個問題

0

刪除「.plugins」,然後重新啓動eclipse和tomcat解決了這個問題。

0

這個問題背後的原因是目前tomcat服務器目錄被另一個進程打開並鎖定。因此,使用下面的步驟來解決反應這個問題

  1. 關閉Tomcat服務器部署目錄
  2. 右鍵單擊服務器 - >清潔Tomcat的工作目錄
  3. 右鍵單擊服務器 - >乾淨,然後重新啓動服務器。
0

我已經根據打擊措施解決了這個問題:

  1. 右鍵點擊你的項目
  2. 選擇屬性 - >部署大會
  3. 點擊按鈕添加,選擇Java Build Path條目,然後按一下按鈕下一頁
  4. 選擇Maven依賴,最後單擊完成
0

我遇到了同樣的問題。你不需要做一些特別的事情。兩種解決方案可能會有幫助

1)重新啓動你的IDE(即eclipse)。 (這可能會幫助你,因爲在我的情況下)

2)重新啓動計算機。這將有助於您毫無疑問地解鎖

注意:清潔Tomcat工作目錄可能無助於您的情況。

相關問題