reset password
Author Message
cysun
Posts: 2935
Posted 15:15 May 12, 2011 |

Sometimes Eclipse gets into some error state that it cannot recover from, and when you try to run your project, you'll get a 404 error that shows either no error message or some weird error messages like java.io.FileNotFoundException: C:\CS520\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\csns\WEB-INF\classes\log4j.xml. In these situations you can manually delete the work directory of the project, which would usually fix the problem:

1. In the Servers view in Eclipse, stop the Tomcat server and remove the project.

2. Close Eclipse.

3. Go to the folder <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0, where <workspace> is the workspace folder of your project. Note that if you have more than one Tomcat server configured in Eclipse, the last part of the path could be different, e.g. it could be tmp1 instead tmp0. To find out the exact server path, in the Servers view in Eclipse, double click on the Tomcat server, and look for Server path under Server Locations.

4. Delete your project from this folder.

5. Start Eclipse.

6. Run the project again. The first time it will give you a 404 error again, probably due to some leftover settings. In the Servers view, remove the project from the server, then run the project again, and this time it should work.

Please check out a screen capture video that demonstrates this process.