Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.2.2
-
None
-
Tomcat 6, Java 1.6, Windows+Linux
Description
Create a simple webapp with the following in web.xml:
<servlet>
<display-name>CXF Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
No fancy code, no real web services, just plain starting of the servlet. Create a war and deploy it into a tomcat. Enjoy the startup of the servlet. Press "undeploy" in the tomcat application manager.
Under windows you will notice that most of the cxf jars are not deleted in the webapps directory, the application isn't completly undeployed. Tomcat seems to lock the jars preventing them from beeing deleted. Subsequent re-deployment of the webapp will fail because of the left-over jars. Hot re-deployment of the webapp is impossible.
Under linux the webapp directory is gone, but this is because linux' ext filesystem allow files beeing deleted that are still held open by an applicaton. When checking with the lsof tool you will see that under linux tomcat still has references to the old jar. Hot re-deployment is possible here, but you will soon run out of permgen memory because the old classes are not unloaded.
It seems the servlet is still locking some kind of resource when undeployed (thus preventing tomcat from beeing able to close and delete the jars). Maybe the destroy method lacks some important cleanup.
This bug is there at least since CXF 2.1.2 and still in 2.2.2.
Attachments
Attachments
Issue Links
- duplicates
-
CXF-1816 Undeploying a CXF web app from tomcat on windows does not delete some CXF files
- Closed