Deployment failure on Tomcat 6. x. cocould not copy all resources

Source: Internet
Author: User

 

Deployment failure on Tomcat 6. x. cocould not copy all resources to c: \ tomcat6 \ webapps \ oapms. if a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment at c: \ tomcat6 \ webapps \ oapms

The problem has been solved. Remember to encounter it once before, but this time is different from the previous one. solution:
1. Check the. mymetadata file in the project to see if a context-root = "" attribute is missing. If it is missing, add that the value is the same as the name attribute of the front edge, such as mine:
<? XML version = "1.0" encoding = "UTF-8"?>
<Project-Module
Type = "Web"
Name = "oapms"
Id = "myeclipse.1191921338406"
Context-root = "/oapms"
J2ee-spec = "1.4"
Archive = "oapms. War">
<Attributes>
<Attribute name = "webrootdir" value = "webroot"/>
</Attributes>
</Project-module>

2. Check. classpath and check whether the classpathentry attribute has a jar file not available in the project Lib. Delete the deployment file.

Today, when I was releasing a project, I suddenly encountered:

Deployment failure on Tomcat 6. x. cocould not copy all resources to E: \ apache-Tomcat-6.0.16 \ webapps \ hebbnwebservices. if a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment
At E: \ apache-Tomcat-6.0.16 \ webapps \ hebbnwebservices

When you click the "deploy" button again, the following message is displayed:

Undeployment failure cocould not be redeployed because it cocould not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running, which has locked one or more files.

To correct the deployment you will need to stop the server and then redeploy the project before restarting the server.

After depressing me for a long time, I finally summarized the following methods to solve the problem.
The solution is to re-Add the JAR file referenced in the project in eclipse. The basic reason is that the previous JAR file does not exist, but the project information also exists, that is, the project. the classpath file also contains references to non-existing jar files.

right-click the project name, select Properties, select Java build path, select libraries, remove all jar files in all projects, and click "add jars ", add the jar files in the project, and the re-deployment will be normal.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.