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.