eclipse/tomcat: deploy doesn't work any more (ClassNotFoundException)
Solution 1:
While on Tomcat 6 and Eclipse Ganymede I found out the following chain to work like charm:
1 stop server
2 project -> clean
3 project build (I had automatic build disabled)
4 delete server
5 delete Servers folder
6 restart Eclipse
7 create new server, add project and start :)
takes some time but worked like charm. My problem was a irritating Listener start problem, but this seems to be something similar: a property at tomcat. Btw: nowadays I am also a big Glassfish fan.
Solution 2:
I found that this procedure is useful:
- Click on Servers tab and Stop the server in use if it's running
- Right click on the server again and select Clean...
- Right click again and select Clean Tomcat Work Directory...
Hopefully the ClassNotFoundException should be gone now.
Another time I had a problem with a class launched at server startup, an exception in a listener class (ServletContextListener). When a ServletContextListener raises an exception during startup the application deployment is aborted, hence the 404 errors. In that case fixing the problem that caused the exception, made the application working again.
EDIT: This shorter procedure worked for me most of the times, but today didn't work and I had to follow Mico's extended procedure. My suggestion is, if you have a similar problem, first try this shorter procedure. If the problem persists, try with Mico's.
Solution 3:
I'd recommend that you stop and start the Tomcat server again. Hot deploy does not work forever; there are some issues that will cause you to have to restart after a few redeploys.
Solution 4:
I wonder when I see the accepted answer with +25 is it really accurate?
First if you are going to delete the server then whats the point in cleaning it? It will take your time unnecessarily and nothing useful will you gain.
So i will say just 5, 6, 7 steps should do the magic
5 delete Servers folder
6 restart Eclipse
7 create new server, add project and start