You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by an...@jpmchase.com on 2006/11/03 14:04:01 UTC

RE: problems with unpacking ROOT.war

Hi there,

I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it
is dropped into webapps, and started.  The problem seems to go away if
ROOT.war contains META-INF/context.xml - but since we deploy this war file
to different environments, shipping it with a context file isn't an option.

See the email below for instructions on how to duplicate the bug.  (btw,
this is quite an old mailtrail, and I notice there are a couple of stray
messages that should belong in this particular mail trail).

I've also experimented today with the manager app, and again , when I use
the deploy ant target, the app fails to start because it seems tomcat isn't
expanding the war file:

    <deploy url="${url}" username="${username}" password="${password}"
            path="${path}" localWar="file://${build}/ROOT.war"
config="file://${build}/ROOT.xml" />

The manager can correctly stop and undeploy the ROOT app, but when I use
the above task, ROOT.war and ROOT.xml are dropped into the correct folders,
but the war *isn't* expanded).

ROOT.xml has the following context attributes:

<Context debug="1" reloadable="true" antiResourceLocking="true"
antiJARLocking="true">

and host has the usual defaults:

<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

My question is:   has anyone else experienced similar problems with
expanding ROOT.war?    My work around is to write ant targets and scripts
to manually expand the war... however I'd like to understand if this is a
bug, or just a quirk of my setup.  If it is a bug, then I'd like to submit
this to tomcat's bugzilla.

thanks

Andy



                                                                           
             andrew.w.cooke@jp                                             
             mchase.com                                                    
                                                                        To 
             18/10/2006 09:32          "Tomcat Users List"                 
                                       <us...@tomcat.apache.org>           
                                                                        cc 
             Please respond to                                             
               "Tomcat Users                                       Subject 
                   List"               RE: problems with unpacking         
             <users@tomcat.apa         ROOT.war                            
                 che.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi Charles,

> Neither one is correct.  You must NOT use the path attribute in a
> <Context> element unless the <Context> is defined in server.xml.  The
> URI path to the app is determined from the name of the .xml file in the
> conf/[engine]/[host] directory.

Thanks for the feedback and the correction.  OK - I have a very simple war
file named ROOT.war - it doesn't a META-INF directory.  I have placed a
file called ROOT.xml into conf/Catalina/localhost with:

      <?xml version="1.0" encoding="UTF-8"?>
      <Context debug="1">
      </Context>

Server.xml has the defaults that come with tomcat 5.5.17:

      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

I put ROOT.war into the webapps directory and start tomcat --> ROOT.war
isn't expanded.

Any other suggestions?  Or might this be a bug?

thanks for your help,

Andy





             "Caldarale,
             Charles R"
             <Chuck.Caldarale@                                          To
             unisys.com>               "Tomcat Users List"
                                       <us...@tomcat.apache.org>
             17/10/2006 14:58                                           cc

                                                                   Subject
             Please respond to         RE: problems with unpacking
               "Tomcat Users           ROOT.war
                   List"
             <users@tomcat.apa
                 che.org>







> From: Michael Courcy [mailto:michael.courcy@gmail.com]
> Subject: Re: problems with unpacking ROOT.war
>
> Maybe a stupid clue but instead of
> <Context path="" debug="1">
> </Context>
>
> What happen if u try
> <Context path="/" debug="1">
> </Context>

Neither one is correct.  You must NOT use the path attribute in a
<Context> element unless the <Context> is defined in server.xml.  The
URI path to the app is determined from the name of the .xml file in the
conf/[engine]/[host] directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
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




---------------------------------------------------------------------
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




-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.


---------------------------------------------------------------------
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: problems with unpacking ROOT.war

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Subject: Re: problems with unpacking ROOT.war
> 
> since the manager app is used to implement the decompression 
> of the war I would set privilieged = "true"

Again, bad information from Martin.  The privileged setting allows an
app to reference container servlets and classes, not the other way
around.

Unfortunately, I have no explanation for why ROOT.war is not being
expanded in all circumstances.  Still poking around in the code.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
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: problems with unpacking ROOT.war

Posted by Martin Gainty <mg...@hotmail.com>.
Andrew-

since the manager app is used to implement the decompression of the war I would set privilieged = "true"
If the decompression error only occurs using Ant deploy task I would ping ant users list  user@ant.apache.org

Anyone else?
M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: <an...@jpmchase.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Friday, November 03, 2006 8:04 AM
Subject: RE: problems with unpacking ROOT.war


> Hi there,
> 
> I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it
> is dropped into webapps, and started.  The problem seems to go away if
> ROOT.war contains META-INF/context.xml - but since we deploy this war file
> to different environments, shipping it with a context file isn't an option.
> 
> See the email below for instructions on how to duplicate the bug.  (btw,
> this is quite an old mailtrail, and I notice there are a couple of stray
> messages that should belong in this particular mail trail).
> 
> I've also experimented today with the manager app, and again , when I use
> the deploy ant target, the app fails to start because it seems tomcat isn't
> expanding the war file:
> 
>    <deploy url="${url}" username="${username}" password="${password}"
>            path="${path}" localWar="file://${build}/ROOT.war"
> config="file://${build}/ROOT.xml" />
> 
> The manager can correctly stop and undeploy the ROOT app, but when I use
> the above task, ROOT.war and ROOT.xml are dropped into the correct folders,
> but the war *isn't* expanded).
> 
> ROOT.xml has the following context attributes:
> 
> <Context debug="1" reloadable="true" antiResourceLocking="true"
> antiJARLocking="true">
> 
> and host has the usual defaults:
> 
> <Host name="localhost" appBase="webapps" unpackWARs="true"
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
> 
> My question is:   has anyone else experienced similar problems with
> expanding ROOT.war?    My work around is to write ant targets and scripts
> to manually expand the war... however I'd like to understand if this is a
> bug, or just a quirk of my setup.  If it is a bug, then I'd like to submit
> this to tomcat's bugzilla.
> 
> thanks
> 
> Andy
> 
> 
> 
>                                                                           
>             andrew.w.cooke@jp                                             
>             mchase.com                                                    
>                                                                        To 
>             18/10/2006 09:32          "Tomcat Users List"                 
>                                       <us...@tomcat.apache.org>           
>                                                                        cc 
>             Please respond to                                             
>               "Tomcat Users                                       Subject 
>                   List"               RE: problems with unpacking         
>             <users@tomcat.apa         ROOT.war                            
>                 che.org>                                                  
>                                                                           
>                                                                           
>                                                                           
>                                                                           
>                                                                           
> 
> 
> 
> 
> Hi Charles,
> 
>> Neither one is correct.  You must NOT use the path attribute in a
>> <Context> element unless the <Context> is defined in server.xml.  The
>> URI path to the app is determined from the name of the .xml file in the
>> conf/[engine]/[host] directory.
> 
> Thanks for the feedback and the correction.  OK - I have a very simple war
> file named ROOT.war - it doesn't a META-INF directory.  I have placed a
> file called ROOT.xml into conf/Catalina/localhost with:
> 
>      <?xml version="1.0" encoding="UTF-8"?>
>      <Context debug="1">
>      </Context>
> 
> Server.xml has the defaults that come with tomcat 5.5.17:
> 
>      <Host name="localhost" appBase="webapps"
>       unpackWARs="true" autoDeploy="true"
>       xmlValidation="false" xmlNamespaceAware="false">
> 
> I put ROOT.war into the webapps directory and start tomcat --> ROOT.war
> isn't expanded.
> 
> Any other suggestions?  Or might this be a bug?
> 
> thanks for your help,
> 
> Andy
> 
> 
> 
> 
> 
>             "Caldarale,
>             Charles R"
>             <Chuck.Caldarale@                                          To
>             unisys.com>               "Tomcat Users List"
>                                       <us...@tomcat.apache.org>
>             17/10/2006 14:58                                           cc
> 
>                                                                   Subject
>             Please respond to         RE: problems with unpacking
>               "Tomcat Users           ROOT.war
>                   List"
>             <users@tomcat.apa
>                 che.org>
> 
> 
> 
> 
> 
> 
> 
>> From: Michael Courcy [mailto:michael.courcy@gmail.com]
>> Subject: Re: problems with unpacking ROOT.war
>>
>> Maybe a stupid clue but instead of
>> <Context path="" debug="1">
>> </Context>
>>
>> What happen if u try
>> <Context path="/" debug="1">
>> </Context>
> 
> Neither one is correct.  You must NOT use the path attribute in a
> <Context> element unless the <Context> is defined in server.xml.  The
> URI path to the app is determined from the name of the .xml file in the
> conf/[engine]/[host] directory.
> 
> - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> 
> -----------------------------------------
> This transmission may contain information that is privileged,
> confidential, legally privileged, and/or exempt from disclosure
> under applicable law.  If you are not the intended recipient, you
> are hereby notified that any disclosure, copying, distribution, or
> use of the information contained herein (including any reliance
> thereon) is STRICTLY PROHIBITED.  Although this transmission and
> any attachments are believed to be free of any virus or other
> defect that might affect any computer system into which it is
> received and opened, it is the responsibility of the recipient to
> ensure that it is virus free and no responsibility is accepted by
> JPMorgan Chase & Co., its subsidiaries and affiliates, as
> applicable, for any loss or damage arising in any way from its use.
> If you received this transmission in error, please immediately
> contact the sender and destroy the material in its entirety,
> whether in electronic or hard copy format. Thank you.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
>