You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Venkatesh Babu <ve...@yahoo.com> on 2006/06/06 08:40:13 UTC

Undeploy task not working

Hello All,

I'm using Tomcat 4.1 and trying to deploy/undeploy
application using ant targets.

Earlier I posted a mail on deploy task not working due
to some protocol error. Got the solution for that :-)

But right now undeploy task is not working. It is
giving an error saying:

FAIL - Cannot remove document base for path /app1

Here is the ant targets I have:

    <property name="tomcat.server.name"
value="127.0.0.1"/>
    <property name="tomcat.server.port" value="8080"/>
    <property name="tomcat.user.name" value="admin"/>
    <property name="tomcat.user.password"
value="admin"/>

    <property name="app.hostname"
value="http://${tomcat.server.name}:${tomcat.server.port}"/>
    <property name="app.deploy.manageurl"
value="${app.hostname}/manager"/>

    <taskdef file="./catalinatasks.properties">
        <classpath>
            <pathelement
path="./lib/catalina-ant.jar"/>
        </classpath>
    </taskdef>

    <target name="undeployapp">
        <undeploy
                url="${app.deploy.manageurl}"
		path="/app1"
                username="${tomcat.user.name}"
                password="${tomcat.user.password}" />
    </target>

I searched the web for solutions to this problem, but
unable to find one. Can anybody please help me and say
as to what is wrong?

Thank you,
Venkatesh


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Undeploy task not working

Posted by Mark Thomas <ma...@apache.org>.
Venkatesh Babu wrote:
> But I'm getting the problem only in Tomcat 4.1.3 ...
> How can this happen?

Because the file locking protection code has been implemented for
4.1.x but will be part of 4.1.32+ which has yet to be released.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Undeploy task not working

Posted by Venkatesh Babu <ve...@yahoo.com>.
Hi Mark,

I went through the link given by you. Also checked for
permissions of "webapps" folder (guess things are
fine). The link is for Tomcat 5.5 but I'm working with
Tomcat 4.3.1 .

The context entry put by tomcat, for app1, when
deploying the application is:
        <Context
className="org.apache.catalina.core.StandardContext"
crossContext="false" reloadable="false"
mapperClass="org.apache.catalina.core.StandardContextMapper"
useNaming="true" debug="0" swallowOutput="false"
privileged="false" displayName="app1"
wrapperClass="org.apache.catalina.core.StandardWrapper"
docBase="C:\Program Files\Apache Group\Tomcat
4.1\webapps\app1" cookies="true" path="/app1"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
workDir="work\Standalone\localhost\app1">
        </Context>



In addition I just want to mention that I installed
Tomcat 5.5 and ran deploy and undeploy targets on it
and everything works fine there.

But I'm getting the problem only in Tomcat 4.1.3 ...
How can this happen?

Thank you,
Venkatesh




--- Mark Thomas <ma...@apache.org> wrote:

> Marc Farrow wrote:
> > Which still implies a permission problem.  On
> Windows 2000 check the
> > security tab of the webapps folder under Tomcat. 
> Make sure the account
> > that
> > is running Tomcat has permission to "delete".  The
> "archive" set is the
> > file
> > type and doesn't really have much to do with
> permissions.
> 
> More likely to be file locking. There are a couple
> of context settings
> that might help you work around this. Look at
>
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> and search
> for antiJARLocking and antiResourceLocking
> 
> As far as I recall there is an issue with one of the
> xml parsers that
> when it accesses resources from a war keeps a lock
> on the file. This
> only happens on Windows.
> 
> Mark
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Undeploy task not working

Posted by Mark Thomas <ma...@apache.org>.
Marc Farrow wrote:
> Which still implies a permission problem.  On Windows 2000 check the
> security tab of the webapps folder under Tomcat.  Make sure the account
> that
> is running Tomcat has permission to "delete".  The "archive" set is the
> file
> type and doesn't really have much to do with permissions.

More likely to be file locking. There are a couple of context settings
that might help you work around this. Look at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html and search
for antiJARLocking and antiResourceLocking

As far as I recall there is an issue with one of the xml parsers that
when it accesses resources from a war keeps a lock on the file. This
only happens on Windows.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Undeploy task not working

Posted by Marc Farrow <ma...@gmail.com>.
Which still implies a permission problem.  On Windows 2000 check the
security tab of the webapps folder under Tomcat.  Make sure the account that
is running Tomcat has permission to "delete".  The "archive" set is the file
type and doesn't really have much to do with permissions.

On 6/7/06, Alberto Montoya <er...@gmail.com> wrote:
>
> 2006/6/7, Venkatesh Babu <ve...@yahoo.com>:
> >
> > Hi,
>
>
> Hi,
>
> Thanks for the replies and suggestions. I'm running
> > Tomcat on a Windows 2000 machine. I saw the directory
> > permissions and it is just an "Archive" set. Also, our
> > webapp is not having any database connection open.
> >
> > Still I'm unable to undeploy the app using undeploy
> > target.
>
>
> I've noticed that, sometimes, I can't undeploy my application and It's due
> that Tomcat can't remove my application directory, so I have to remove it
> manually after stopping Tomcat.
>
> Thank you,
> > Venkatesh
> >
> > --- Marc Farrow <ma...@gmail.com> wrote:
> >
> > > It also could be a permissions problem.  What
> > > platform is the server?  I
> > > know on OpenVMS that if you use the manager
> > > application to deploy an
> > > application and then try to undeploy it, the
> > > permissions on the directory
> > > are not correct and thus it cannot delete the
> > > directories.  (There is a
> > > logical to change this behavior for OpenVMS).  So I
> > > would suggest to check
> > > your permissions before you try to undeploy and make
> > > sure you have delete
> > > privileges.
> > >
> > > HTH
> > >
> > >
> > > On 6/6/06, Peter Hubbard <pe...@mighty.co.za>
> > > wrote:
> > > >
> > > > On Mon, 2006-06-05 at 23:40 -0700, Venkatesh Babu
> > > wrote:
> > > > > Hello All,
> > > > >
> > > > > I'm using Tomcat 4.1 and trying to
> > > deploy/undeploy
> > > > > application using ant targets.
> > > > >
> > > > > Earlier I posted a mail on deploy task not
> > > working due
> > > > > to some protocol error. Got the solution for
> > > that :-)
> > > > >
> > > > > But right now undeploy task is not working. It
> > > is
> > > > > giving an error saying:
> > > > >
> > > > > FAIL - Cannot remove document base for path
> > > /app1
> > > >
> > > > I found this often happened to me if there were
> > > open database
> > > > connections in the webapp, and I tried to undeploy
> > > it before stopping
> > > > it.
> > > >
> > > >
> > > > --
> > > > Peter Hubbard <pe...@mighty.co.za>
> > > >
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To start a new topic, e-mail:
> > > users@tomcat.apache.org
> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail:
> > > users-help@tomcat.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Marc Farrow
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>


-- 
Marc Farrow

Re: Undeploy task not working

Posted by Alberto Montoya <er...@gmail.com>.
2006/6/7, Venkatesh Babu <ve...@yahoo.com>:
>
> Hi,


Hi,

Thanks for the replies and suggestions. I'm running
> Tomcat on a Windows 2000 machine. I saw the directory
> permissions and it is just an "Archive" set. Also, our
> webapp is not having any database connection open.
>
> Still I'm unable to undeploy the app using undeploy
> target.


I've noticed that, sometimes, I can't undeploy my application and It's due
that Tomcat can't remove my application directory, so I have to remove it
manually after stopping Tomcat.

Thank you,
> Venkatesh
>
> --- Marc Farrow <ma...@gmail.com> wrote:
>
> > It also could be a permissions problem.  What
> > platform is the server?  I
> > know on OpenVMS that if you use the manager
> > application to deploy an
> > application and then try to undeploy it, the
> > permissions on the directory
> > are not correct and thus it cannot delete the
> > directories.  (There is a
> > logical to change this behavior for OpenVMS).  So I
> > would suggest to check
> > your permissions before you try to undeploy and make
> > sure you have delete
> > privileges.
> >
> > HTH
> >
> >
> > On 6/6/06, Peter Hubbard <pe...@mighty.co.za>
> > wrote:
> > >
> > > On Mon, 2006-06-05 at 23:40 -0700, Venkatesh Babu
> > wrote:
> > > > Hello All,
> > > >
> > > > I'm using Tomcat 4.1 and trying to
> > deploy/undeploy
> > > > application using ant targets.
> > > >
> > > > Earlier I posted a mail on deploy task not
> > working due
> > > > to some protocol error. Got the solution for
> > that :-)
> > > >
> > > > But right now undeploy task is not working. It
> > is
> > > > giving an error saying:
> > > >
> > > > FAIL - Cannot remove document base for path
> > /app1
> > >
> > > I found this often happened to me if there were
> > open database
> > > connections in the webapp, and I tried to undeploy
> > it before stopping
> > > it.
> > >
> > >
> > > --
> > > Peter Hubbard <pe...@mighty.co.za>
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To start a new topic, e-mail:
> > users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> > users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail:
> > users-help@tomcat.apache.org
> > >
> > >
> >
> >
> > --
> > Marc Farrow
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Undeploy task not working

Posted by Venkatesh Babu <ve...@yahoo.com>.
Hi,

Thanks for the replies and suggestions. I'm running
Tomcat on a Windows 2000 machine. I saw the directory
permissions and it is just an "Archive" set. Also, our
webapp is not having any database connection open.

Still I'm unable to undeploy the app using undeploy
target.

Thank you,
Venkatesh

--- Marc Farrow <ma...@gmail.com> wrote:

> It also could be a permissions problem.  What
> platform is the server?  I
> know on OpenVMS that if you use the manager
> application to deploy an
> application and then try to undeploy it, the
> permissions on the directory
> are not correct and thus it cannot delete the
> directories.  (There is a
> logical to change this behavior for OpenVMS).  So I
> would suggest to check
> your permissions before you try to undeploy and make
> sure you have delete
> privileges.
> 
> HTH
> 
> 
> On 6/6/06, Peter Hubbard <pe...@mighty.co.za>
> wrote:
> >
> > On Mon, 2006-06-05 at 23:40 -0700, Venkatesh Babu
> wrote:
> > > Hello All,
> > >
> > > I'm using Tomcat 4.1 and trying to
> deploy/undeploy
> > > application using ant targets.
> > >
> > > Earlier I posted a mail on deploy task not
> working due
> > > to some protocol error. Got the solution for
> that :-)
> > >
> > > But right now undeploy task is not working. It
> is
> > > giving an error saying:
> > >
> > > FAIL - Cannot remove document base for path
> /app1
> >
> > I found this often happened to me if there were
> open database
> > connections in the webapp, and I tried to undeploy
> it before stopping
> > it.
> >
> >
> > --
> > Peter Hubbard <pe...@mighty.co.za>
> >
> >
> >
>
---------------------------------------------------------------------
> > To start a new topic, e-mail:
> users@tomcat.apache.org
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >
> 
> 
> -- 
> Marc Farrow
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Undeploy task not working

Posted by Marc Farrow <ma...@gmail.com>.
It also could be a permissions problem.  What platform is the server?  I
know on OpenVMS that if you use the manager application to deploy an
application and then try to undeploy it, the permissions on the directory
are not correct and thus it cannot delete the directories.  (There is a
logical to change this behavior for OpenVMS).  So I would suggest to check
your permissions before you try to undeploy and make sure you have delete
privileges.

HTH


On 6/6/06, Peter Hubbard <pe...@mighty.co.za> wrote:
>
> On Mon, 2006-06-05 at 23:40 -0700, Venkatesh Babu wrote:
> > Hello All,
> >
> > I'm using Tomcat 4.1 and trying to deploy/undeploy
> > application using ant targets.
> >
> > Earlier I posted a mail on deploy task not working due
> > to some protocol error. Got the solution for that :-)
> >
> > But right now undeploy task is not working. It is
> > giving an error saying:
> >
> > FAIL - Cannot remove document base for path /app1
>
> I found this often happened to me if there were open database
> connections in the webapp, and I tried to undeploy it before stopping
> it.
>
>
> --
> Peter Hubbard <pe...@mighty.co.za>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Marc Farrow

Re: Undeploy task not working

Posted by Peter Hubbard <pe...@mighty.co.za>.
On Mon, 2006-06-05 at 23:40 -0700, Venkatesh Babu wrote:
> Hello All,
> 
> I'm using Tomcat 4.1 and trying to deploy/undeploy
> application using ant targets.
> 
> Earlier I posted a mail on deploy task not working due
> to some protocol error. Got the solution for that :-)
> 
> But right now undeploy task is not working. It is
> giving an error saying:
> 
> FAIL - Cannot remove document base for path /app1

I found this often happened to me if there were open database
connections in the webapp, and I tried to undeploy it before stopping
it.


-- 
Peter Hubbard <pe...@mighty.co.za>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org