修改jsp文件tomcat發佈失敗(Could not delete May be locked by another process)

環境:eclipse tomcat
以前使用沒有什麼問題可是忽然項目修改jsp文件後,tomcat不能發佈,
Publishing failed with multiple errors
  Could not delete D:\Tomcat 6.0\webapps\Server\WEB-INF\platform\configuration\org.eclipse.core.runtime\.manager\.tmp1900396474661591532.instance. c.
  Could not delete D:\Tomcat 6.0\webapps\Server\WEB-INF\platform\configuration\org.eclipse.core.runtime\.manager\.tmp1907896664996379798.instance. May be locked by another process.
  Could not delete D:\Tomcat 6.0\webapps\Server\WEB-INF\platform\configuration\org.eclipse.equinox.app\.manager\.tmp2761653564891974481.instance. May be locked by another process.
 
網上找了兩種解決辦法
1.原文:
I was getting the annoying error in Eclipse with Tomcat where it didn’t think it could publish an application since some files were locked, when they were locked by the javaw.exe process that eclipse.exe started. The fix for me was to not have 「Use Tomcat installation」 selected in my server configuration. When I switched back to the default of 「Use workspace metadata」, the error stopped happening.
[http://byprogrammerforprogrammer.com/2009/12/eclipsetomcat-publishing-lockup-could-not-delete-file-may-be-locked-by-another-process/]

 修改項目的發佈地址
 
不過這個辦法在我機器上沒有起做用,我又發現了另外一種方法
 
2.原文
 I performed a "clean" operation on the Tomcat server instance and the problem just went away. It's being doing fine since that. I'll let you know if I see this issue again.
[http://forums.adobe.com/message/2457298?tstart=0](3樓: )
 
 
 
 
我使用這種方法時,問題剛開始消失了,但過了一陣又是老樣子。
 
我忽然想到同一個eclipse下的別的項目使用的時候沒有出現這個問題,有多是項目設置的問題,
這個web項目引用了另一個java項目(項目B),兩個項目有一些相同的jar包,是否是這些相同的jar發佈的問題呢,我把項目B的Java EE Module Dependencies(項目B右鍵->Properties->Java EE Module Dependencies)裏的jar包引用去掉,問題解決了。
相關文章
相關標籤/搜索