You are here

Could not deploy project to Tomcat with MyEclipse

Sometimes project can not be deployed to Tomcat with MyEclipse, and met such exception:

XXX could not be redeployed because it could 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.


1. Check Properties->MyEclipse->Project Facets->Web->Context Root

The value should be same as your current project name.


2. Open .classpath file in your project, find and remove[or add] "org.eclipse.jst.component.dependency":

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">


<attribute name="maven.pomderived" value="true"/>

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>