You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Thorsten Schöning (JIRA)" <ji...@apache.org> on 2014/08/29 12:39:53 UTC

[jira] [Commented] (AXIS2-4094) Jars are locked in the file system even after undeployment of the axis2 webapp

    [ https://issues.apache.org/jira/browse/AXIS2-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14115096#comment-14115096 ] 

Thorsten Schöning commented on AXIS2-4094:
------------------------------------------

I have the same issue with current Tomcat 7 and Axis2 1.6.2: Even if I stop the Axis2 service the jars in the lib dirs of the distinct services stay locked and can't be replaced. Things like telling Tomcat not to lock jars didn't work for me, so I guess it's really Axis2 locking things and Tomcat simply doesn't know about it.

https://confluence.sakaiproject.org/display/BOOT/Avoiding+JAR+and+file+locking+under+Windows
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Standard%20Implementation

As a workaround one can use the "Find leaks" button in the bottom of the Tomcat manager app, which triggers a full garbage collection. After hitting that button Axis2 seems to get completely unloaded from memory and all locked files are unlocked. Sometimes Tomcat notes that Axis2 leaked memory even if it has been stopped, sometimes not... Luckily this functionality is available for ANT as well, if you need to automatically deploy some Axis2 services, like I do:

http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/ant/FindLeaksTask.html

	<taskdef	name="findLeaks"
				classname="org.apache.catalina.ant.FindLeaksTask"
				uri="catalina-ant"
	/>
	<taskdef	name="start"
				classname="org.apache.catalina.ant.StartTask"
				uri="catalina-ant"
	/>
	<taskdef	name="stop"
				classname="org.apache.catalina.ant.StopTask"
				uri="catalina-ant"
	/>
	<condition	property="isTomcatRunning">
		<and>
			<http url="${tomcat-url}" />
		</and>
	</condition>
	<target	name="startAxis2Svc"
			if="isTomcatRunning">
		<catalina-ant:start xmlns:catalina-ant="catalina-ant"
			url="${tomcat-manager-url}"
			username="${tomcat-manager-username}"
			password="${tomcat-manager-password}"
			path="/${axis2SvcName}"
		/>
	</target>
	<target	name="stopAxis2Svc"
			if="isTomcatRunning">
		<catalina-ant:stop xmlns:catalina-ant="catalina-ant"
			url="${tomcat-manager-url}"
			username="${tomcat-manager-username}"
			password="${tomcat-manager-password}"
			path="/${axis2SvcName}"
		/>
		<catalina-ant:findLeaks xmlns:catalina-ant="catalina-ant"
			url="${tomcat-manager-url}"
			username="${tomcat-manager-username}"
			password="${tomcat-manager-password}"
		/>
	</target>

> Jars are locked in the file system even after undeployment of the axis2 webapp
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-4094
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4094
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.4, 1.4.1
>         Environment: WinXP, Tomcat 4.1, Tomcat 5.5, Tomcat 6, WebSphere 6.0 & 6.1, Glassfish 2,
>            Reporter: Michael Heemskerk
>            Assignee: Deepal Jayasinghe
>
> Webapp containing axis2 servlet cannot be succesfuly undeployed because jar files in WEB-INF/lib are locked and cannot be deleted until the servlet container is stopped.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org