File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Undeploy not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Undeploy not working" Watch "Undeploy not working" New topic
Author

Undeploy not working

Nirmala Rayudu
Greenhorn

Joined: May 30, 2005
Posts: 14
Hello,
I am using JavaMail APIs in my web-application and some of the functions offerred by the web-app involve sending emails using the JavaMail APIs.
When I undeploy the Web-App, the web-app directory Tomcat5.0.28\webapps directory in not deleted completely, the only file left behind is Tomcat5.0.28\webapps\<myapp>\WEB-INF\lib\mail.jar(mail.jar is the Library for JavaMail).

Does anyone know why this might be happening? I greatly appreciate any response.

thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Did you check the permissions on that file?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nirmala Rayudu
Greenhorn

Joined: May 30, 2005
Posts: 14
Ben,
The file has read-only permission in the web-application's lib directory when it is deployed, but so do all other library files I have in the lib directory, and all of them are deleted by Tomcat.

thanks
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Nimala Rayudu:
Ben,
The file has read-only permission in the web-application's lib directory when it is deployed, but so do all other library files I have in the lib directory, and all of them are deleted by Tomcat.

thanks


This is a known problem with Tomcat under WinWows, but not when running under Solaris or Linux. I've been fighting with it all day and have found some documentation in
the Tomcat Windows FAQ. The faq suggests using the antiJARLocking attribute in the context.xml file to prevent this. I haven't tried this yet, but conversations on the Sun forums indicate that it isn't fully fixed as of Tomcat-5.5.7.

I use WinXP as my development environment and Solaris as my run environment and have different Ant targets for producing the war files. For Windows I put most of the jars in commons/lib which may cause classloader problems if multiple apps use the jars, but I only run one app under windows. For Solaris I put the jars in WEB-INF/lib where they belong. I know its a nasty kludge, but it works.

One package that really doesn't belong in common/lib is Velocity, its jars MUST be in WEB-INF/lib since it uses the Singleton Pattern, luckily it doesn't have the locked jars problem. The Hibernate documentation warns against putting anything in common/lib.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Undeploy not working