突然項目修改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.clean
原文:
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包引用去掉,問題解決了。
3.new server
簡單有效可行的方法,把原來拋錯的tomcat server delete,再重新 new 一個!!!別再糾結了哦~~嘎嘎 : P
重新建立一個Server,然后 switched back to the default of “Use workspace metadata”, 問題解決 ,OH YEAH!!!