为什么我的发布在 Tomcat v7.0 服务器中由于另一个进程的锁定而失败?

2022-09-01 13:46:31

我在我的eclipse(helios)环境中设置了一个Tomcat v7.0服务器,我用它来测试Web应用程序。目前,我的工作空间中有一个正确加载到服务器的struts web应用程序,以及两个我尝试上传的动态Web项目。主要是,一个简单的类,我想把它变成第一个项目的axis2的Web服务,第二个项目变成一个简单的html页面(用于测试这个问题)。

但是,两者都无法在服务器内部正确加载,并且我看到另一个进程错误的锁定。

服务器控制台给出的错误是:

    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.

...等

是否有人已经遇到此问题并知道解决方案?


答案 1

1-停止服务器
2-清理服务器
3-清理雄猫工作目录...enter image description here


答案 2
  1. 在控制台窗口中,您可以找到堆栈跟踪,只需将选项卡从控制台切换到服务器(或从窗口 ->显示视图 ->服务器)中显示它)。
  2. 双击您的tomcat服务器,它将打开tomcat的概述。你会发现两个选项卡(在窗口的底部)。概述和模块
  3. 单击“模块”。您将在那里找到列出的项目。
  4. 删除所有项目并清理服务器(右键单击服务器的名称 ->清理)。

尝试重新启动服务器,它将开始工作,因为它对我有用。


推荐