You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by sandyg <ga...@gmail.com> on 2008/07/04 11:56:28 UTC

removing and installing application gives exception

Hi,
i got the follow exception when using this code.

<taskdef name="install" classname="org.apache.catalina.ant.InstallTask" >
 	 	        <classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask">
 	 	        <classpath refid="catalina-ant-classpath"/>
</taskdef>
<target name="install" description="Install application in Tomcat">
		    <install url="${tomcat.manager.url}"
		                 username="${tomcat.manager.username}"
		                 password="${tomcat.manager.password}"
		                 path="/${warname}" 
						 war="${basedir}\${dist}\${warname}.war"/>
</target>
 	
 	<target name="remove" description="Remove application in Tomcat">
 		 <remove url="${tomcat.manager.url}" taskname="remove"
 	            username="${tomcat.manager.username}"
 	            password="${tomcat.manager.password}"
 	            path="/${warname}"/>
 	    </target>

every thing is running fine in above code.
 when i am removing the application using remove target it runs fine but
when again when i need to install back to server it throwing exception.

FAIL - Encountered exception javax.management.RuntimeOperationsException:
Exception invoking method check

plz give me solution.

-- 
View this message in context: http://www.nabble.com/removing-and-installing-application-gives-exception-tp18276441p18276441.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: removing and installing application gives exception

Posted by supareno <re...@free.fr>.
sandyg,

you don't have to write 'plz giv...'. don't worry, someone will answer :-)
so, i know that the remove task is deprecated [1]. it is better to use 
the undeploy task like this:

<target name="remove" description="Remove application in Tomcat">
        <undeploy url="${tomcat.manager.url}"
            username="${tomcat.username}"
            password="${tomcat.password}"
            path="/${webapp.name}"/>
    </target>

[1] 
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/ant/RemoveTask.html

hope this help

supareno

> Hi,
> i got the follow exception when using this code.
>
> <taskdef name="install" classname="org.apache.catalina.ant.InstallTask" >
>  	 	        <classpath refid="catalina-ant-classpath"/>
> </taskdef>
> <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask">
>  	 	        <classpath refid="catalina-ant-classpath"/>
> </taskdef>
> <target name="install" description="Install application in Tomcat">
> 		    <install url="${tomcat.manager.url}"
> 		                 username="${tomcat.manager.username}"
> 		                 password="${tomcat.manager.password}"
> 		                 path="/${warname}" 
> 						 war="${basedir}\${dist}\${warname}.war"/>
> </target>
>  	
>  	<target name="remove" description="Remove application in Tomcat">
>  		 <remove url="${tomcat.manager.url}" taskname="remove"
>  	            username="${tomcat.manager.username}"
>  	            password="${tomcat.manager.password}"
>  	            path="/${warname}"/>
>  	    </target>
>
> every thing is running fine in above code.
>  when i am removing the application using remove target it runs fine but
> when again when i need to install back to server it throwing exception.
>
> FAIL - Encountered exception javax.management.RuntimeOperationsException:
> Exception invoking method check
>
> plz give me solution.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org