You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lauren Commons <lh...@yahoo.com> on 2003/04/24 19:37:29 UTC

App Manager problems (revised)

I have had a problem using the app manager to remove
and install war files.  In short, It does not install
the new ware file, but re-installs the old application
(even if you specify a war file that doesn't exist, it
will "succesfully" install a prior version of the
application!!)
I thought I had this straightened out when I changed
the <host> element in server.xml to unpackWARS=false. 
(for completness, I currently have liveDeploy=false
and autoDeploy=true).
With unpackWARS=false, new war files DO get installed
properly... but the application doesn't work (I think
because it is trying to read config files that it
can't find inside the war file.)
So my questions are:
1) How does Tomcat holds on to an application after I
have removed it, so that it can (erroneously) install
the old version the next time I install that app?
2) Does it make sense that setting unpackWARS=false
would influence this?  I couldn't find that documented
anywhere.

Thanks.

=====
-------------------------
Mr Lauren Commons
DISCLAIMER: The opinions expressed 
ARE in fact those of my employer.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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


Re: App Manager problems (revised)

Posted by Glenn Nielsen <gl...@mail.more.net>.
This is true for Tomcat release 4.1.18 and earlier.
Tomcat 4.1.24 has many bug fixes and minor enhancements to the manager
and HTML manager.  The HTML manager now allows you to upload a war
file to install.

Regards,

Glenn

Jacob Kjome wrote:
> 
> Install/remove doesn't modify anything on the file system.  It simply 
> installs/removes the specified .war file or directory to and from 
> Tomcat's current memory.  If you put your app where Tomcat automatically 
> looks for applications then, for instance, on a restart, Tomcat will 
> re-install the application by default.  I would suggest installing your 
> app from some non-default place on the file system so that Tomcat 
> doesn't automatically know where to find the app again.  If you want to 
> have your app persist after a server restart, then use the catalina ant 
> manager tasks to do a deploy/undeploy.
> 
> As far as the app no starting up when it is being run directly from a 
> .war file, that is the fault of your application.  If it is using any 
> File IO whatsoever, the app will fail because there is no such thing as 
> File IO from inside an archive.  Read your config file using something 
> like context.getResourceAsStream("/WEB-INF/myconfig.properties") and 
> everything will work.
> 
> Jake
> 
> At 10:37 AM 4/24/2003 -0700, you wrote:
> 
>> I have had a problem using the app manager to remove
>> and install war files.  In short, It does not install
>> the new ware file, but re-installs the old application
>> (even if you specify a war file that doesn't exist, it
>> will "succesfully" install a prior version of the
>> application!!)
>> I thought I had this straightened out when I changed
>> the <host> element in server.xml to unpackWARS=false.
>> (for completness, I currently have liveDeploy=false
>> and autoDeploy=true).
>> With unpackWARS=false, new war files DO get installed
>> properly... but the application doesn't work (I think
>> because it is trying to read config files that it
>> can't find inside the war file.)
>> So my questions are:
>> 1) How does Tomcat holds on to an application after I
>> have removed it, so that it can (erroneously) install
>> the old version the next time I install that app?
>> 2) Does it make sense that setting unpackWARS=false
>> would influence this?  I couldn't find that documented
>> anywhere.
>>
>> Thanks.
>>
>> =====
>> -------------------------
>> Mr Lauren Commons
>> DISCLAIMER: The opinions expressed
>> ARE in fact those of my employer.
>>
>> __________________________________________________
>> Do you Yahoo!?
>> The New Yahoo! Search - Faster. Easier. Bingo
>> http://search.yahoo.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



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


Re: App Manager problems (revised)

Posted by Lauren Commons <lh...@yahoo.com>.
Jacob:

Thanks for the quick response.  

See comments below.
--- Jacob Kjome <ho...@visi.com> wrote:
> 
> Install/remove doesn't modify anything on the file
> system.  

That's not true, at least as of version 4.1.24.  I
just confirmed by doing an ls -al of the webapps
directory before and after removing the app.  the
application's directory is removed.
In version 4.0.4 what you say is true.

> It simply 
> installs/removes the specified .war file or
> directory to and from Tomcat's 
> current memory.  

I'm guessing this is the heart of the problem: it
doesn't appear to be removing it "far enough" from
memory, so on a re-install the app previously in
memory is re-installed.

> If you put your app where Tomcat
> automatically looks for 
> applications then, for instance, on a restart,
> Tomcat will re-install the 
> application by default. 
> I would suggest installing
> your app from some 
> non-default place on the file system so that Tomcat
> doesn't automatically 
> know where to find the app again.  

I believe I've tried that (if I understand what you're
saying).  I put the war file somewhere other than
webapps.  Initially I thought that worked... but no.
Uploading the war file, when it doesn't even exist on
the server gives the same results.
NOTE that this DOES work if unpackWARS=false, but that
doesn't help.

> If you want to
> have your app persist 
> after a server restart, then use the catalina ant
> manager tasks to do a 
> deploy/undeploy.
> 

> As far as the app no starting up when it is being
> run directly from a .war 
> file, that is the fault of your application.  If it
> is using any File IO 
> whatsoever, the app will fail because there is no
> such thing as File IO 
> from inside an archive.  Read your config file using
> something like 
>
context.getResourceAsStream("/WEB-INF/myconfig.properties")
> and everything 
> will work.

Yes, that's true, but it misses the point: Unless
there is a glaring hole in the app manager or it's
documentation, the remove and install should work the
same either way, and it appears they don't.


> 
> Jake
> 

Thanks again,
Lauren
> At 10:37 AM 4/24/2003 -0700, you wrote:
> >I have had a problem using the app manager to
> remove
> >and install war files.  In short, It does not
> install
> >the new ware file, but re-installs the old
> application
> >(even if you specify a war file that doesn't exist,
> it
> >will "succesfully" install a prior version of the
> >application!!)
> >I thought I had this straightened out when I
> changed
> >the <host> element in server.xml to
> unpackWARS=false.
> >(for completness, I currently have liveDeploy=false
> >and autoDeploy=true).
> >With unpackWARS=false, new war files DO get
> installed
> >properly... but the application doesn't work (I
> think
> >because it is trying to read config files that it
> >can't find inside the war file.)
> >So my questions are:
> >1) How does Tomcat holds on to an application after
> I
> >have removed it, so that it can (erroneously)
> install
> >the old version the next time I install that app?
> >2) Does it make sense that setting unpackWARS=false
> >would influence this?  I couldn't find that
> documented
> >anywhere.
> >
> >Thanks.
> >
> >=====
> >-------------------------
> >Mr Lauren Commons
> >DISCLAIMER: The opinions expressed
> >ARE in fact those of my employer.
> >
> >__________________________________________________
> >Do you Yahoo!?
> >The New Yahoo! Search - Faster. Easier. Bingo
> >http://search.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


=====
-------------------------
Mr Lauren Commons
DISCLAIMER: The opinions expressed 
ARE in fact those of my employer.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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


Re: App Manager problems (revised)

Posted by Jacob Kjome <ho...@visi.com>.
Install/remove doesn't modify anything on the file system.  It simply 
installs/removes the specified .war file or directory to and from Tomcat's 
current memory.  If you put your app where Tomcat automatically looks for 
applications then, for instance, on a restart, Tomcat will re-install the 
application by default.  I would suggest installing your app from some 
non-default place on the file system so that Tomcat doesn't automatically 
know where to find the app again.  If you want to have your app persist 
after a server restart, then use the catalina ant manager tasks to do a 
deploy/undeploy.

As far as the app no starting up when it is being run directly from a .war 
file, that is the fault of your application.  If it is using any File IO 
whatsoever, the app will fail because there is no such thing as File IO 
from inside an archive.  Read your config file using something like 
context.getResourceAsStream("/WEB-INF/myconfig.properties") and everything 
will work.

Jake

At 10:37 AM 4/24/2003 -0700, you wrote:
>I have had a problem using the app manager to remove
>and install war files.  In short, It does not install
>the new ware file, but re-installs the old application
>(even if you specify a war file that doesn't exist, it
>will "succesfully" install a prior version of the
>application!!)
>I thought I had this straightened out when I changed
>the <host> element in server.xml to unpackWARS=false.
>(for completness, I currently have liveDeploy=false
>and autoDeploy=true).
>With unpackWARS=false, new war files DO get installed
>properly... but the application doesn't work (I think
>because it is trying to read config files that it
>can't find inside the war file.)
>So my questions are:
>1) How does Tomcat holds on to an application after I
>have removed it, so that it can (erroneously) install
>the old version the next time I install that app?
>2) Does it make sense that setting unpackWARS=false
>would influence this?  I couldn't find that documented
>anywhere.
>
>Thanks.
>
>=====
>-------------------------
>Mr Lauren Commons
>DISCLAIMER: The opinions expressed
>ARE in fact those of my employer.
>
>__________________________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org