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

47,383

Solution 1

I had totally forgotten about this question. Actually, the problem was elsewhere, to solve the "lock" problem all i had to do was restart the computer. Then i had other problems, but that doesn't concern this question.

Solution 2

1- Stop the Server
2- Clean the Server
3- Clean Tomcat Work Directory ... enter image description here

Solution 3

  1. In the console window, where you find the stack trace, just switch the tab from console to servers (or display it from Window -> Show View -> Servers).
  2. Double-click on your tomcat server, it will open up an overview of tomcat. You will find two tabs(on the bottom of the window). Overview and Modules.
  3. Click on Modules. You will find the projects listed there.
  4. Remove all of the projects and clean the server (right click on server's name -> Clean).

Try restarting the server and it will start working, as it worked for me.

Solution 4

I had the same issue. I solved it by doing a clean on the server several times. Every time I was doing the clean, different libraries were locked, until finally all were unlocked. I hope it helps!

Solution 5

I faced the same problem; removing the modules from the TomCat server solved the problem

Share:
47,383
Th0rndike
Author by

Th0rndike

Passionate developer. I work with C# and .NET technologies most of the time, but I also enjoy experimenting with different technologies like Firebase and Node.js on my free time.

Updated on October 23, 2020

Comments

  • Th0rndike
    Th0rndike over 3 years

    I have a Tomcat v7.0 server setup in my eclipse (helios) environment which I use for testing web applications. Currently I have in my workspace a struts web-app which is loaded correctly into the server, along with two ther dynamic web projects which im trying to upload. Mainly, a simple class which i want to turn into a web service for axis2 for the first project and a simple html page (made for testing this issue) for the second one.

    However, neither one are loading correctly inside the server and I'm seeing locks by another process errors.

    The error given by the server console is:

        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.
    

    ...etc

    Has someone already encountered this issue and knows of a solution?