- This topic has 11 replies, 4 voices, and was last updated 20 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
Samer KanjoParticipant“Undeployment failure on Tomcat 5- stop server and manually remove C:\Bin\tomcat-5.0.14\webapps\CRIS Web Project”
I constantly receive the above error and it is driving me crazy. In order to deploy my web application to Tomcat 5 I to need shut it down and manually remove the project folder from the Tomcat webapps folder and rebuild my project. I need to rebuild the project everytime because the project has the above warning. The warning stops me from doing a build or from redeploying.
There are no other errors or warnings and once I do deploy the project it runs fine.
Sometimes it will delete the project contents from the Tomcat webapps project folder but it will not delete the project folder itself, which happens without exception.
There is not much else to say. Does anyone have any ideas what is causing this?
Riyad KallaMemberPlease see this thread:
https://www.genuitec.com/forums/topic/undeploy-failure-closed/&highlight=undeployment+failureUsing packaged deployment should fix the problem as the container is locking some resources from deletion.
Samer KanjoParticipantThe thread was not useful at all.
I removed the exploded project deployment and added a packaged deployment. As soon as I did that the web project was deployed.
As a test, I modified one of the JSP pages and redeployed. It worked fine. I then made more changes and redeployed. I happened to miss a proerty on a tag so the deployment failed. I fixed the problem. In order to redeploy I have to rebuild the project which I did. The deployment failed again only the message this time is the following.
“Undeployment failure on Tomcat 5 – stop server and manually remove C:\Bin\tomcat-5.0.14\webapps\CRIS Web Project.war”
I stopped Tomcat and removed the WAR. I then rebuilt the project but deployment failed again with the same message. I then removed the project folder from the Tomcat webapps folder and rebuilt the project. Again the same message as above.
It just so happens that I read a post in this forum where a gentleman was having a similiar problem with an EJB project. He found that deleting his EAR and then creating an empty file with the name of the EAR allowed the deployment to work but that didn’t work.
Now I can’t get the thing to deploy at all. The WAR is gone and the application folder is gone and nothing! I tried to delete the Tomcat project deployment so I could try recreating it but that failed too because it could not undeploy. I can’t do anything with the project right now!
It seems that there are deployment problems after an error is found. Just a guess.
I am going to have to go into the code myself and bypass the undeploy.
Samer KanjoParticipantOh yeah, if the server is shutdown how can it be locking resources? I could understand that kind of thinking if the server was started but not when it is shutdown. I think the problem lies somewhere else.
Riyad KallaMemberskanjo,
Sorry for my short reply before, yes you have clearly found a problem that needs addressing. Can you (for our reference and internal bug tracking) reply to this message and hit “Insert” and fill out your system info. Also please grab the last few “!SESSION—————–” entries from your <eclipse install>\workspace\.metadata\.log file and paste them in the message as well to see if a particular exception can help lead us to the problem faster.I am going to mark this as a bug and fire the message up a level.
I’m sorry for the trouble this has caused, we’ll try and get this fixed ASAP.
Samer KanjoParticipant– System Setup ——————————-
Operating System and version: W2K SP4
Eclipse version: 3.0m6
Eclipse build id: 200312182000
Fresh Eclipse install (y/n): y
If not, was it upgraded to its current version using the update manager?
Other installed external plugins: Metanology MDE
Number of plugins in the <eclipse>/plugins directory: 93
MyEclipse version: 3.7rc2
Eclipse JDK version: j2sdk1.4.2.02
Application Server JDK version: Tomcat 5.0.14
Are there any exceptions in the Eclipse log file? Many– Message Body ——————————-
Are you sure you want me to post them here? Even just the last few are very long, around 5000 lines total.
If you want me to post that much let me know. It probably would be better if I mailed it to you.
On a high note…
After posting my last I started looking for a config file that had my project deployment settings so I could delete it and see if that at least allowed me to try deployment again. I found it. I figured I should shutdown eclipse before making changes but then I thought why not restart eclipse and see what happens.
When I restarted I discovered that the project deployment was now gone. What?? I then created a new exlopded deployment since I had more success with that then the package deployment.
I got errors. In addition to the usual cannot deploy warning I got a new error indicated that my build path was not correct. “How did that get messed up?”, I thought since I have been making builds for 2 days. Anyway, I started checking the project properties and found that my included libraries were no longer checked to be included in the build path. After fixing the error and rebuilding I have not really had any problems with exploded deployments even when Tomcat is running. Good news!
I am tempted to try the packaged deployment but I do not want to jinx myself.
Thanks for you responses!
undefined
Riyad KallaMemberskanjo,
This is good news! Yes restarting eclipse is always a good idea when things get messed up (especially the deployments). Would you mind trying packaged deployment for a day and letting us know if it worked? Getting deployment working correctly and fixing bugs for it is very high on the priority list for the next release, so we would like to know if there is really a problem or if it was just some fluke bad karma that you had 🙂
support-michaelKeymasterA few note on why deployments fail:
They fail because resources get locked either by a running appserver or a user action.
1) JBoss and Tomcat seem to like locking directories and jar files.
2) User’s initiate locking problems on Windows installs by using tools such as FileExplorer and Notepad to view/edit deployed directories and files in their server’s.
3) Also if you exit Eclipse without stopping a running instance of your appserver the instance may continue to run. Tomcat definitely does this. We have an open PR to remedy this behavior.
Other deployment notes:
1) ME’s deployment plugin maintains a persistent record of all deployments in the form of a simple properties file. This file is reconciled each time ME is started. ME checks for the existence of all deployed resources. Those found to be missing are assume to have been manually undeployed. This is why sometime just recycling ME will resolve an out of sync situation.2) We feature that we have been trying to work in the mix is a “Reload” capability that we believe will reduce some of the locking problems. For example of JBoss and a few other servers if you touch the web.xml file the server will automatically reload the application. This is much faster and less error prone than the “Redeploy” option which is a big hammer approach to practically the same solution and is vulnerable to the locked resource issue.
Presently we are researching how we can reduce the appserver locking situations since it is most annoying for all of us. We are researching with Tomcat now. If you have suggestions we are listening.
Samer KanjoParticipantI have been running with no problems since. I will start using packaged deployment to see if I have any issues.
I have noticed that even having Windows Explorer opened to a folder in an exploded deployment will cause a deployment problem.
I don’t know why I had so many problems in the beginning. It could have been bad karma or perhaps, more likely, pilot error :).
BTW: I have found the ability to debug JSPs very useful. The product has good bang for the buck so far.
Riyad KallaMemberThank you for the kind words and we are glad things are working for you now.
Guus VorstermanMemberHi,
I am also using Tomcat 5 for testing and am getting this “undeployment failure” message when redeploying an app when
using the exploded archive option.
Using a package archive works but changing a small thing and redeploying the packaged archive again and again takes up a lot of time
when you use struts+jsf+hibernate.guus
Riyad KallaMemberguus,
If you click on the deployment after it fails, it should give you a reason why it failed. I”m 99% sure it is a file locking issue and the old deployment cannot be fully removed.Please keep in mind that if you setup Tomcat to auto-reload changes, and you use an exploded deployment in MyEclipse… all of your changes are deployed real-time to the server… this is our “HotSync” feature… so full redeployments are only necessary when you get the error back from the server (in Eclipse) saying “Hotsync replacement has failed”, then you need to shut down the server, redeploy, and restart the server.
-
AuthorPosts