Tomcat Start 报错 (COULD NOT DELETE MAY BE LOCKED BY ANOTHER PROCESS)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tomcat Start 报错 (COULD NOT DELETE MAY BE LOCKED BY ANOTHER PROCESS)相关的知识,希望对你有一定的参考价值。

jsp文件重命名后发布不起来了,提示文件被占用,原因是当前的java ee项目 与它引用的java项目 依赖了相同的jar包,删除了clean 再发布,问题解决,如有需要再引用回来

 

http://it.zhaozhao.info/archives/44926

环境: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包引用去掉,问题解决了。

以上是关于Tomcat Start 报错 (COULD NOT DELETE MAY BE LOCKED BY ANOTHER PROCESS)的主要内容,如果未能解决你的问题,请参考以下文章

Electron常见问题 60 - 报错:Could not start audio source

Electron常见问题 60 - 报错:Could not start audio source

错误记录使用 Sonatype Nexus 搭建 Maven 私服报错 ( Could not start service. Error code: 1060 )

启动tomcat报错 Could not reserve enough space for object heap的解决办法

MyEclipse启动Tomcat报错:Could not find the main class: org.apache.catalina.startup

saiku 3.8 二次开发报错之Could not start repo 找不到configuration.xml文件