繁体   English   中英

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

[英]Why is my publishing failing in Tomcat v7.0 Server because of locks by another process?

我在我的eclipse(helios)环境中设置了Tomcat v7.0服务器,用于测试Web应用程序。 目前我在我的工作区中有一个struts web-app,它正确地加载到服务器中,以及我试图上传的两个动态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-停止服务器
2-清理服务器
3-清理Tomcat工作目录...... 在此输入图像描述

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

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

我完全忘记了这个问题。 实际上,问题出在其他地方,解决“锁定”问题我所要做的就是重新启动计算机。 然后我有其他问题,但这不涉及这个问题。

我遇到过同样的问题。 我通过多次在服务器上清理来解决它。 每次我干净的时候,都会锁定不同的图书馆,直到最后所有图书馆都被解锁。 我希望它有所帮助!

我遇到了同样的问题; 从TomCat服务器中删除模块解决了这个问题

这个问题背后的原因是当前tomcat服务器目录被另一个进程打开并锁定。 因此,请使用以下步骤解决此问题 -

  1. 关闭tomcat服务器部署目录
  2. 右键单击服务器 - >清理tomcat工作目录
  3. 右键单击服务器 - >清理并重新启动服务器。

我已根据打击步骤解决了问题:

  1. 右键单击您的项目
  2. 选择Properties - > Deployment Assembly
  3. 单击Add按钮,选择Java Build Path Entries ,然后单击Next按钮
  4. 选择Maven Dependencies ,最后单击Finish

我遇到了同样的问题。 你不需要做一些特别的事情。 两个解决方案可能会有所帮

1)重新启动IDE(即eclipse)。 (这可能对你有帮助,因为在我的情况下它确实如此)

2)重新启动计算机。 这将帮助你以解除锁定毫无疑问。

注意: 清理Tomcat工作目录可能对您的情况没有帮助。

我已经解决了这个问题。

我用Apache Tomcate 9.0服务器开发了Spring Boot应用程序。 这个应用程序运行成功,没有任何错误,直到今天,但突然我得到一个错误,如

could not delete.jars may be locked by othors

我犯了两个错误。

  1. 由于过期,我今天更改了密码,但忘了在.m2/setting.xml更改密码。 所以我纠正了这一点。

  2. 我从pom.xml删除了以下依赖项:

     <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM