Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 630
Th0rndike Avatar asked Mar 09 '12 10:03

Th0rndike


People also ask

What is publishing in Tomcat?

The Publish option in the server tab will deploy the application to your Tomcat instance by copying the project resources such as xml configuration files , web resource (html ,css, js etc) , and the compiled . class files you get from the "project > Build" to the correct location of the Tomcat instance .

Why does Tomcat hang?

It started up and hung up again. I checked it and found that the system memory was too full and automatically killed the tomcat process! Both are common Out of memory problems. This is usually caused by a large amount of memory requested by an application at a certain time, resulting in insufficient system memory.


1 Answers

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

like image 159
Usman Avatar answered Oct 04 '22 04:10

Usman