You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Joe Reger, Jr." <jo...@joereger.com> on 2005/02/14 16:37:13 UTC

FW: Re: Missing application web.xml Tomcat 5.5.7

 
Hi All.
 
I'm still having trouble with this issue.  I'm not able to upload a .WAR
file through the html web application manager but the same war manually
exploded and placed into the /webapps directory works fine.  I've included
the web.xml to see if anybody can determine why Tomcat's rejecting it. I've
Included the stdout log file.  Some notes from the log4j tomcat debug file:
 
Line 91: Tomcat has found the context.xml and moved it to
$CatalinaRoot$\conf\Catalina\localhost\ROOT.xml
 
Line 537: org.apache.catalina.core.StandardContext - Starting ROOT
 
Line 7542: org.apache.catalina.startup.ContextConfig - Missing application
web.xml, using defaults only
 
Line 7744: org.apache.catalina.startup.HostConfig - Checking context[]
redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT
 
Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]]
org.apache.catalina.core.StandardContext - Stopping
 
Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war
 
Here's what I see when I deploy:
 
Click upload.  Tomcat moves ROOT.war into $CatalinaRoot$\webapps\.
Context.xml, from inside the .war file seen in
$CatalinaRoot$\conf\localhost.  Application appears in manager/html.  A few
seconds later the application dissappears and all files are deleted.
 
The tomcat sample war file appears to be broken  too :
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
 
I'm open to suggestions.  More info below.
 
Thanks,
 
Joe

  _____  

From: Joe Reger, Jr. [mailto:joe@joereger.com] 
Sent: Wednesday, February 02, 2005 11:58 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: Re: Missing application web.xml


Hi!
 
I'm having problems with the "Missing application web.xml" error on dev
machines running Windows XP,. Tomcat 5.5.7, Java 5.0.
 
It happens when I try to deploy a war file by using the Manager app or by
placing it in the /webapps directory.  Here are some of the things I've
done, each time trying to deploy the resulting WAR file with no success and
the same error:
 
1) Completely emptied the /webapps directory (per Paul's success below). 
2) Verified existence of web.xml inside WAR file.
3) Uninstalled ROOT app and verified file removal from /webapps directory.
4) Checked order of elements in web.xml to fit spec.
5) Validated web.xml in Intellij Idea against
http://java.sun.com/dtd/web-app_2_3.dtd
6) Changed <web-app> tag from the sample web.xml in documentation to the one
used in Manager app from 5.5.7 build:
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
7) Removed all comments and spaces from web.xml.
 
When I unpack the WAR manually and place the unpacked files in /webapps the
application works fine.  Tomcat likes the web.xml, but it can't seem to find
it inside of the WAR file.
 
Incidentally, when I watch my /webapps directory during a Manager deploy,
the ROOT.war file does appear for a few seconds.  It appears that Tomcat is
trying to find a web.xml inside of it, fails and then deletes the file.
 
I use Ant to build the WAR file:
<jar jarfile="ROOT.war">
   <fileset dir="${files}" excludes="**/*.java"/>
</jar>
 
Any help appreciated.  Seen this on two development XP machines today.
 
Best,
 
Joe Reger
 
 
 ---Original Message----------------------------------------------------
I just wanted to follow up and get into the record what I think is the 

solution to the problem I asked about

on 1/20.  I turns out that the reason I was getting "Missing 

application web.xml" errors in my stdout.log

was because of a problem that arose during the undeployment 

precipitated by my deployment of a new

build.  It appears (just based on Tomcat's behavior) that when you move 

a WAR file into the webapps directory, the first thing Tomcat tries to 

do is delete the old unpacked version.  In my case, it failed to do 

that because (as I found) the servlet had open file handles to files 

inside the servlet's context directory.  Windows  XP doesn't let you 

delete files that it thinks are "in use", and I suspect that is the 

trouble Tomcat was running into.  Anyway, it deleted everything except 

those files, including the web.xml file, which it then reported as 

missing.



When I modified my code to make sure the files were closed after being 

read, the problem went away.  Well, I haven't had the fix in place long 

enough to be sure it has gone away, but at the very least it certainly 

seems to have helped a great deal, so I think the problem is solved.



    --Paul Lynch (eph1v3t8 @ mailblocks.com)

RE: FW: Re: Missing application web.xml Tomcat 5.5.7

Posted by "Joe Reger, Jr." <jo...@joereger.com>.
Hi,

Sorry for the confusion on the variable name.  I undeploy the ROOT context
that comes stock with Tomcat.  I don't believe that this is a conflict with
another app being installed at the same context name.  Before each attempt
to upload the ROOT.war file I manually shut down Tomcat and delete any
/ROOT, ROOT.war and $CATALINA_HOME\conf\Catalina\localhost\ROOT.xml files so
that the instance is clean.

When I do the upload, Tomcat successfully moves ROOT.war to
$CATALINA_HOME\webapps\ (I watch the directory manually).  In the manager
web interfact it says that the app is successfully installed and it lists a
root context.  But then, upon refreshing a few seconds later the app has
been undeployed and the "Missing application web.xml" error appears in
stdout.  

I can shutdown tomcat, clean all ROOT context references, manually explode
the war file to  $CATALINA_HOME\webapps\ROOT\, restart Tomcat and the app
works perfectly.  It seemed initially like Tomcat was having trouble
extracting the war file but there was something I saw in the detailed log4j
debugs or on the file system that made me believe that it was successfully
able to get into the war, it just didn't like what it saw.  I forget what I
saw, but I believe that it was successfully reading in custom variables from
my context.xml, inside of the war file.

Thanks for the help,

Joe


-----Original Message-----
From: sven morales [mailto:aka_sergio@yahoo.com] 
Sent: Monday, February 14, 2005 11:31 PM
To: Tomcat Users List
Subject: RE: FW: Re: Missing application web.xml Tomcat 5.5.7

Hi,
   Using $CATALINA_HOME and or $CATALINA_BASE is the more proper way to
describe those directory references. 
   No I am not having trouble with web.xml file when
deploying a WAR file.   I'm trying to assist you
troubleshoot.
   Are you trying to deploy an additional ROOT.war? 
There is an existing ROOT context that came as stock installed and this will
most likely conflict with the new one with same name you are trying to
deploy.  So either remove the existing one or rename your ROOT.war to
another name.

aka_sergio





--- "Joe Reger, Jr." <jo...@joereger.com> wrote:

> Hi,
> I'm just using that to represent the root tomcat installation 
> directory.
> For me it's C:\Superfly\Tomcat 5.5\.  For you it may be different.
> 
> Are you having any trouble with the web.xml file when deployinga WAR 
> through the manager app?
> Joe   
> 
> -----Original Message-----
> From: sven morales [mailto:aka_sergio@yahoo.com]
> Sent: Monday, February 14, 2005 1:12 PM
> To: Tomcat Users List
> Subject: Re: FW: Re: Missing application web.xml Tomcat 5.5.7
> 
> Hi,
>    Where are you getting this $CatalinaRoot ?  I don't see this env 
> var set in catalina.sh.
> 
> aka_sergio
> --- "Joe Reger, Jr." <jo...@joereger.com> wrote:
> 
> >  
> > Hi All.
> >  
> > I'm still having trouble with this issue.  I'm not
> able to upload a
> > .WAR file through the html web application manager
> but the same war
> > manually exploded and placed into the /webapps
> directory works fine.  
> > I've included the web.xml to see if anybody can
> determine why Tomcat's
> > rejecting it. I've Included the stdout log file. 
> Some notes from the
> > log4j tomcat debug file:
> >  
> > Line 91: Tomcat has found the context.xml and
> moved it to
> > $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml
> >  
> > Line 537: org.apache.catalina.core.StandardContext
> - Starting ROOT
> >  
> > Line 7542:
> org.apache.catalina.startup.ContextConfig
> > - Missing application
> > web.xml, using defaults only
> >  
> > Line 7744: org.apache.catalina.startup.HostConfig
> - Checking context[]
> > redeploy resource C:\SuperFly\Tomcat
> 5.5\webapps\ROOT
> >  
> > Line 7746:
> >
>
ContainerBackgroundProcessor[StandardEngine[Catalina]]
> > org.apache.catalina.core.StandardContext -
> Stopping
> >  
> > Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war
> >  
> > Here's what I see when I deploy:
> >  
> > Click upload.  Tomcat moves ROOT.war into
> $CatalinaRoot$\webapps\.
> > Context.xml, from inside the .war file seen in 
> > $CatalinaRoot$\conf\localhost.  Application
> appears in manager/html.  
> > A few seconds later the application dissappears
> and all files are
> > deleted.
> >  
> > The tomcat sample war file appears to be broken
> too
> > :
> >
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
> >  
> > I'm open to suggestions.  More info below.
> >  
> > Thanks,
> >  
> > Joe
> > 
> >   _____
> > 
> > From: Joe Reger, Jr. [mailto:joe@joereger.com]
> > Sent: Wednesday, February 02, 2005 11:58 AM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: Re: Missing application web.xml
> > 
> > 
> > Hi!
> >  
> > I'm having problems with the "Missing application
> web.xml" error on
> > dev machines running Windows XP,. Tomcat 5.5.7,
> Java 5.0.
> >  
> > It happens when I try to deploy a war file by
> using the Manager app or
> > by placing it in the /webapps directory.  Here are
> some of the things
> > I've done, each time trying to deploy the
> resulting WAR file with no
> > success and the same error:
> >  
> > 1) Completely emptied the /webapps directory (per
> Paul's success
> > below).
> > 2) Verified existence of web.xml inside WAR file.
> > 3) Uninstalled ROOT app and verified file removal
> from /webapps
> > directory.
> > 4) Checked order of elements in web.xml to fit
> spec.
> > 5) Validated web.xml in Intellij Idea against 
> > http://java.sun.com/dtd/web-app_2_3.dtd
> > 6) Changed <web-app> tag from the sample web.xml
> in documentation to
> > the one used in Manager app from 5.5.7 build:
> >     <web-app
> xmlns="http://java.sun.com/xml/ns/j2ee"
> >    
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >    
> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >     version="2.4">
> > 7) Removed all comments and spaces from web.xml.
> >  
> > When I unpack the WAR manually and place the
> unpacked files in
> > /webapps the application works fine.  Tomcat likes
> the web.xml, but it
> > can't seem to find it inside of the WAR file.
> >  
> > Incidentally, when I watch my /webapps directory
> during a Manager
> > deploy, the ROOT.war file does appear for a few
> seconds.  It appears
> > that Tomcat is trying to find a web.xml inside of
> it, fails and then
> > deletes the file.
> >  
> > I use Ant to build the WAR file:
> > <jar jarfile="ROOT.war">
> >    <fileset dir="${files}" excludes="**/*.java"/>
> </jar>
> >  
> > Any help appreciated.  Seen this on two
> development XP machines today.
> >  
> > Best,
> >  
> > Joe Reger
> >  
> >  
> >  ---Original
> >
>
Message----------------------------------------------------
> > I just wanted to follow up and get into the record
> what I think is the
> > 
> > solution to the problem I asked about
> > 
> > on 1/20.  I turns out that the reason I was
> getting "Missing
> > 
> > application web.xml" errors in my stdout.log
> > 
> > was because of a problem that arose during the
> undeployment
> > 
> > precipitated by my deployment of a new
> > 
> > build.  It appears (just based on Tomcat's
> behavior) that when you
> > move
> > 
> > a WAR file into the webapps directory, the first
> thing Tomcat tries to
> > 
> > do is delete the old unpacked version.  In my
> case, it failed to do
> > 
> > that because (as I found) the servlet had open
> file handles to files
> > 
> > inside the servlet's context directory.  Windows
> XP doesn't let you
> > 
> > delete files that it thinks are "in use", and I
> suspect
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.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: FW: Re: Missing application web.xml Tomcat 5.5.7

Posted by sven morales <ak...@yahoo.com>.
Hi,
   Using $CATALINA_HOME and or $CATALINA_BASE is the
more proper way to describe those directory
references. 
   No I am not having trouble with web.xml file when
deploying a WAR file.   I'm trying to assist you
troubleshoot.
   Are you trying to deploy an additional ROOT.war? 
There is an existing ROOT context that came as stock
installed and this will most likely conflict with the
new one with same name you are trying to deploy.  So
either remove the existing one or rename your ROOT.war
to another name.

aka_sergio





--- "Joe Reger, Jr." <jo...@joereger.com> wrote:

> Hi,
> I'm just using that to represent the root tomcat
> installation directory.
> For me it's C:\Superfly\Tomcat 5.5\.  For you it may
> be different.
> 
> Are you having any trouble with the web.xml file
> when deployinga WAR through
> the manager app?
> Joe   
> 
> -----Original Message-----
> From: sven morales [mailto:aka_sergio@yahoo.com] 
> Sent: Monday, February 14, 2005 1:12 PM
> To: Tomcat Users List
> Subject: Re: FW: Re: Missing application web.xml
> Tomcat 5.5.7
> 
> Hi,
>    Where are you getting this $CatalinaRoot ?  I
> don't see this env var set
> in catalina.sh.  
> 
> aka_sergio
> --- "Joe Reger, Jr." <jo...@joereger.com> wrote:
> 
> >  
> > Hi All.
> >  
> > I'm still having trouble with this issue.  I'm not
> able to upload a 
> > .WAR file through the html web application manager
> but the same war 
> > manually exploded and placed into the /webapps
> directory works fine.  
> > I've included the web.xml to see if anybody can
> determine why Tomcat's 
> > rejecting it. I've Included the stdout log file. 
> Some notes from the 
> > log4j tomcat debug file:
> >  
> > Line 91: Tomcat has found the context.xml and
> moved it to 
> > $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml
> >  
> > Line 537: org.apache.catalina.core.StandardContext
> - Starting ROOT
> >  
> > Line 7542:
> org.apache.catalina.startup.ContextConfig
> > - Missing application
> > web.xml, using defaults only
> >  
> > Line 7744: org.apache.catalina.startup.HostConfig
> - Checking context[] 
> > redeploy resource C:\SuperFly\Tomcat
> 5.5\webapps\ROOT
> >  
> > Line 7746:
> >
>
ContainerBackgroundProcessor[StandardEngine[Catalina]]
> > org.apache.catalina.core.StandardContext -
> Stopping
> >  
> > Line 7825: Delete C:\SuperFly\Tomcat
> > 5.5\webapps\ROOT.war
> >  
> > Here's what I see when I deploy:
> >  
> > Click upload.  Tomcat moves ROOT.war into
> $CatalinaRoot$\webapps\.
> > Context.xml, from inside the .war file seen in 
> > $CatalinaRoot$\conf\localhost.  Application
> appears in manager/html.  
> > A few seconds later the application dissappears
> and all files are 
> > deleted.
> >  
> > The tomcat sample war file appears to be broken 
> too
> > :
> >
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
> >  
> > I'm open to suggestions.  More info below.
> >  
> > Thanks,
> >  
> > Joe
> > 
> >   _____
> > 
> > From: Joe Reger, Jr. [mailto:joe@joereger.com]
> > Sent: Wednesday, February 02, 2005 11:58 AM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: Re: Missing application web.xml
> > 
> > 
> > Hi!
> >  
> > I'm having problems with the "Missing application
> web.xml" error on 
> > dev machines running Windows XP,. Tomcat 5.5.7,
> Java 5.0.
> >  
> > It happens when I try to deploy a war file by
> using the Manager app or 
> > by placing it in the /webapps directory.  Here are
> some of the things 
> > I've done, each time trying to deploy the
> resulting WAR file with no 
> > success and the same error:
> >  
> > 1) Completely emptied the /webapps directory (per
> Paul's success 
> > below).
> > 2) Verified existence of web.xml inside WAR file.
> > 3) Uninstalled ROOT app and verified file removal
> from /webapps 
> > directory.
> > 4) Checked order of elements in web.xml to fit
> spec.
> > 5) Validated web.xml in Intellij Idea against 
> > http://java.sun.com/dtd/web-app_2_3.dtd
> > 6) Changed <web-app> tag from the sample web.xml
> in documentation to 
> > the one used in Manager app from 5.5.7 build:
> >     <web-app
> xmlns="http://java.sun.com/xml/ns/j2ee"
> >    
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >    
> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >     version="2.4">
> > 7) Removed all comments and spaces from web.xml.
> >  
> > When I unpack the WAR manually and place the
> unpacked files in 
> > /webapps the application works fine.  Tomcat likes
> the web.xml, but it 
> > can't seem to find it inside of the WAR file.
> >  
> > Incidentally, when I watch my /webapps directory
> during a Manager 
> > deploy, the ROOT.war file does appear for a few
> seconds.  It appears 
> > that Tomcat is trying to find a web.xml inside of
> it, fails and then 
> > deletes the file.
> >  
> > I use Ant to build the WAR file:
> > <jar jarfile="ROOT.war">
> >    <fileset dir="${files}" excludes="**/*.java"/>
> </jar>
> >  
> > Any help appreciated.  Seen this on two
> development XP machines today.
> >  
> > Best,
> >  
> > Joe Reger
> >  
> >  
> >  ---Original
> >
>
Message----------------------------------------------------
> > I just wanted to follow up and get into the record
> what I think is the
> > 
> > solution to the problem I asked about
> > 
> > on 1/20.  I turns out that the reason I was
> getting "Missing
> > 
> > application web.xml" errors in my stdout.log
> > 
> > was because of a problem that arose during the
> undeployment
> > 
> > precipitated by my deployment of a new
> > 
> > build.  It appears (just based on Tomcat's
> behavior) that when you 
> > move
> > 
> > a WAR file into the webapps directory, the first
> thing Tomcat tries to
> > 
> > do is delete the old unpacked version.  In my
> case, it failed to do
> > 
> > that because (as I found) the servlet had open
> file handles to files
> > 
> > inside the servlet's context directory.  Windows 
> XP doesn't let you
> > 
> > delete files that it thinks are "in use", and I
> suspect 
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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


RE: FW: Re: Missing application web.xml Tomcat 5.5.7

Posted by "Joe Reger, Jr." <jo...@joereger.com>.
Hi,
I'm just using that to represent the root tomcat installation directory.
For me it's C:\Superfly\Tomcat 5.5\.  For you it may be different.

Are you having any trouble with the web.xml file when deployinga WAR through
the manager app?
Joe   

-----Original Message-----
From: sven morales [mailto:aka_sergio@yahoo.com] 
Sent: Monday, February 14, 2005 1:12 PM
To: Tomcat Users List
Subject: Re: FW: Re: Missing application web.xml Tomcat 5.5.7

Hi,
   Where are you getting this $CatalinaRoot ?  I don't see this env var set
in catalina.sh.  

aka_sergio
--- "Joe Reger, Jr." <jo...@joereger.com> wrote:

>  
> Hi All.
>  
> I'm still having trouble with this issue.  I'm not able to upload a 
> .WAR file through the html web application manager but the same war 
> manually exploded and placed into the /webapps directory works fine.  
> I've included the web.xml to see if anybody can determine why Tomcat's 
> rejecting it. I've Included the stdout log file.  Some notes from the 
> log4j tomcat debug file:
>  
> Line 91: Tomcat has found the context.xml and moved it to 
> $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml
>  
> Line 537: org.apache.catalina.core.StandardContext - Starting ROOT
>  
> Line 7542: org.apache.catalina.startup.ContextConfig
> - Missing application
> web.xml, using defaults only
>  
> Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] 
> redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT
>  
> Line 7746:
>
ContainerBackgroundProcessor[StandardEngine[Catalina]]
> org.apache.catalina.core.StandardContext - Stopping
>  
> Line 7825: Delete C:\SuperFly\Tomcat
> 5.5\webapps\ROOT.war
>  
> Here's what I see when I deploy:
>  
> Click upload.  Tomcat moves ROOT.war into $CatalinaRoot$\webapps\.
> Context.xml, from inside the .war file seen in 
> $CatalinaRoot$\conf\localhost.  Application appears in manager/html.  
> A few seconds later the application dissappears and all files are 
> deleted.
>  
> The tomcat sample war file appears to be broken  too
> :
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
>  
> I'm open to suggestions.  More info below.
>  
> Thanks,
>  
> Joe
> 
>   _____
> 
> From: Joe Reger, Jr. [mailto:joe@joereger.com]
> Sent: Wednesday, February 02, 2005 11:58 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Re: Missing application web.xml
> 
> 
> Hi!
>  
> I'm having problems with the "Missing application web.xml" error on 
> dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0.
>  
> It happens when I try to deploy a war file by using the Manager app or 
> by placing it in the /webapps directory.  Here are some of the things 
> I've done, each time trying to deploy the resulting WAR file with no 
> success and the same error:
>  
> 1) Completely emptied the /webapps directory (per Paul's success 
> below).
> 2) Verified existence of web.xml inside WAR file.
> 3) Uninstalled ROOT app and verified file removal from /webapps 
> directory.
> 4) Checked order of elements in web.xml to fit spec.
> 5) Validated web.xml in Intellij Idea against 
> http://java.sun.com/dtd/web-app_2_3.dtd
> 6) Changed <web-app> tag from the sample web.xml in documentation to 
> the one used in Manager app from 5.5.7 build:
>     <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>    
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>     version="2.4">
> 7) Removed all comments and spaces from web.xml.
>  
> When I unpack the WAR manually and place the unpacked files in 
> /webapps the application works fine.  Tomcat likes the web.xml, but it 
> can't seem to find it inside of the WAR file.
>  
> Incidentally, when I watch my /webapps directory during a Manager 
> deploy, the ROOT.war file does appear for a few seconds.  It appears 
> that Tomcat is trying to find a web.xml inside of it, fails and then 
> deletes the file.
>  
> I use Ant to build the WAR file:
> <jar jarfile="ROOT.war">
>    <fileset dir="${files}" excludes="**/*.java"/> </jar>
>  
> Any help appreciated.  Seen this on two development XP machines today.
>  
> Best,
>  
> Joe Reger
>  
>  
>  ---Original
>
Message----------------------------------------------------
> I just wanted to follow up and get into the record what I think is the
> 
> solution to the problem I asked about
> 
> on 1/20.  I turns out that the reason I was getting "Missing
> 
> application web.xml" errors in my stdout.log
> 
> was because of a problem that arose during the undeployment
> 
> precipitated by my deployment of a new
> 
> build.  It appears (just based on Tomcat's behavior) that when you 
> move
> 
> a WAR file into the webapps directory, the first thing Tomcat tries to
> 
> do is delete the old unpacked version.  In my case, it failed to do
> 
> that because (as I found) the servlet had open file handles to files
> 
> inside the servlet's context directory.  Windows  XP doesn't let you
> 
> delete files that it thinks are "in use", and I suspect that is the
> 
> trouble Tomcat was running into.  Anyway, it deleted everything except
> 
> those files, including the web.xml file, which it then reported as
> 
> missing.
> 
> 
> 
> When I modified my code to make sure the files were closed after being
> 
> read, the problem went away.  Well, I haven't had the fix in place 
> long
> 
> enough to be sure it has gone away, but at the very least it certainly
> 
> seems to have helped a great deal, so I think the problem is solved.
> 
> 
> 
>     --Paul Lynch (eph1v3t8 @ mailblocks.com)
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> <!--
> <!DOCTYPE web-app
>      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd">
> -->
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>    
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>     version="2.4">
>     <filter>
>         <filter-name>UrlRewriteFilter</filter-name>
>        
>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-cla
ss>
>     </filter>
>     <filter-mapping>
>         <filter-name>UrlRewriteFilter</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <servlet>
>       <servlet-name>Loader</servlet-name>
>      
>
<servlet-class>reger.scheduler.Loader</servlet-class>
>       <load-on-startup>100</load-on-startup>
>   </servlet>
>    <servlet-mapping>
>         <servlet-name>default</servlet-name>
>         <url-pattern>/</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.jsp</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.log</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.jspx</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.xml</url-pattern>
>     </servlet-mapping>
>     <session-config>
>         <session-timeout>20</session-timeout>
>     </session-config>
>     <welcome-file-list>
>         <welcome-file>index.log</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>     </welcome-file-list>
>     <error-page>
>         <error-code>500</error-code>
>         <location>/error/500.jsp</location>
>     </error-page>
>     <resource-ref>
>         <description>Database
> Connection</description>
>         <res-ref-name>jdbc/db</res-ref-name>
>         <res-type>javax.sql.DataSource</res-type>
>         <res-auth>Container</res-auth>
>     </resource-ref>
> </web-app>
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.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: FW: Re: Missing application web.xml Tomcat 5.5.7

Posted by sven morales <ak...@yahoo.com>.
Hi,
   Where are you getting this $CatalinaRoot ?  I don't
see this env var set in catalina.sh.  

aka_sergio
--- "Joe Reger, Jr." <jo...@joereger.com> wrote:

>  
> Hi All.
>  
> I'm still having trouble with this issue.  I'm not
> able to upload a .WAR
> file through the html web application manager but
> the same war manually
> exploded and placed into the /webapps directory
> works fine.  I've included
> the web.xml to see if anybody can determine why
> Tomcat's rejecting it. I've
> Included the stdout log file.  Some notes from the
> log4j tomcat debug file:
>  
> Line 91: Tomcat has found the context.xml and moved
> it to
> $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml
>  
> Line 537: org.apache.catalina.core.StandardContext -
> Starting ROOT
>  
> Line 7542: org.apache.catalina.startup.ContextConfig
> - Missing application
> web.xml, using defaults only
>  
> Line 7744: org.apache.catalina.startup.HostConfig -
> Checking context[]
> redeploy resource C:\SuperFly\Tomcat
> 5.5\webapps\ROOT
>  
> Line 7746:
>
ContainerBackgroundProcessor[StandardEngine[Catalina]]
> org.apache.catalina.core.StandardContext - Stopping
>  
> Line 7825: Delete C:\SuperFly\Tomcat
> 5.5\webapps\ROOT.war
>  
> Here's what I see when I deploy:
>  
> Click upload.  Tomcat moves ROOT.war into
> $CatalinaRoot$\webapps\.
> Context.xml, from inside the .war file seen in
> $CatalinaRoot$\conf\localhost.  Application appears
> in manager/html.  A few
> seconds later the application dissappears and all
> files are deleted.
>  
> The tomcat sample war file appears to be broken  too
> :
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/
>  
> I'm open to suggestions.  More info below.
>  
> Thanks,
>  
> Joe
> 
>   _____  
> 
> From: Joe Reger, Jr. [mailto:joe@joereger.com] 
> Sent: Wednesday, February 02, 2005 11:58 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Re: Missing application web.xml
> 
> 
> Hi!
>  
> I'm having problems with the "Missing application
> web.xml" error on dev
> machines running Windows XP,. Tomcat 5.5.7, Java
> 5.0.
>  
> It happens when I try to deploy a war file by using
> the Manager app or by
> placing it in the /webapps directory.  Here are some
> of the things I've
> done, each time trying to deploy the resulting WAR
> file with no success and
> the same error:
>  
> 1) Completely emptied the /webapps directory (per
> Paul's success below). 
> 2) Verified existence of web.xml inside WAR file.
> 3) Uninstalled ROOT app and verified file removal
> from /webapps directory.
> 4) Checked order of elements in web.xml to fit spec.
> 5) Validated web.xml in Intellij Idea against
> http://java.sun.com/dtd/web-app_2_3.dtd
> 6) Changed <web-app> tag from the sample web.xml in
> documentation to the one
> used in Manager app from 5.5.7 build:
>     <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>    
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>     version="2.4">
> 7) Removed all comments and spaces from web.xml.
>  
> When I unpack the WAR manually and place the
> unpacked files in /webapps the
> application works fine.  Tomcat likes the web.xml,
> but it can't seem to find
> it inside of the WAR file.
>  
> Incidentally, when I watch my /webapps directory
> during a Manager deploy,
> the ROOT.war file does appear for a few seconds.  It
> appears that Tomcat is
> trying to find a web.xml inside of it, fails and
> then deletes the file.
>  
> I use Ant to build the WAR file:
> <jar jarfile="ROOT.war">
>    <fileset dir="${files}" excludes="**/*.java"/>
> </jar>
>  
> Any help appreciated.  Seen this on two development
> XP machines today.
>  
> Best,
>  
> Joe Reger
>  
>  
>  ---Original
>
Message----------------------------------------------------
> I just wanted to follow up and get into the record
> what I think is the 
> 
> solution to the problem I asked about
> 
> on 1/20.  I turns out that the reason I was getting
> "Missing 
> 
> application web.xml" errors in my stdout.log
> 
> was because of a problem that arose during the
> undeployment 
> 
> precipitated by my deployment of a new
> 
> build.  It appears (just based on Tomcat's behavior)
> that when you move 
> 
> a WAR file into the webapps directory, the first
> thing Tomcat tries to 
> 
> do is delete the old unpacked version.  In my case,
> it failed to do 
> 
> that because (as I found) the servlet had open file
> handles to files 
> 
> inside the servlet's context directory.  Windows  XP
> doesn't let you 
> 
> delete files that it thinks are "in use", and I
> suspect that is the 
> 
> trouble Tomcat was running into.  Anyway, it deleted
> everything except 
> 
> those files, including the web.xml file, which it
> then reported as 
> 
> missing.
> 
> 
> 
> When I modified my code to make sure the files were
> closed after being 
> 
> read, the problem went away.  Well, I haven't had
> the fix in place long 
> 
> enough to be sure it has gone away, but at the very
> least it certainly 
> 
> seems to have helped a great deal, so I think the
> problem is solved.
> 
> 
> 
>     --Paul Lynch (eph1v3t8 @ mailblocks.com)
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> <!--
> <!DOCTYPE web-app
>      PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd">
> -->
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>    
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>     version="2.4">
>     <filter>
>         <filter-name>UrlRewriteFilter</filter-name>
>        
>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
>     </filter>
>     <filter-mapping>
>         <filter-name>UrlRewriteFilter</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <servlet>
>       <servlet-name>Loader</servlet-name>
>      
>
<servlet-class>reger.scheduler.Loader</servlet-class>
>       <load-on-startup>100</load-on-startup>
>   </servlet>
>    <servlet-mapping>
>         <servlet-name>default</servlet-name>
>         <url-pattern>/</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.jsp</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.log</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.jspx</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>jsp</servlet-name>
>         <url-pattern>*.xml</url-pattern>
>     </servlet-mapping>
>     <session-config>
>         <session-timeout>20</session-timeout>
>     </session-config>
>     <welcome-file-list>
>         <welcome-file>index.log</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>     </welcome-file-list>
>     <error-page>
>         <error-code>500</error-code>
>         <location>/error/500.jsp</location>
>     </error-page>
>     <resource-ref>
>         <description>Database
> Connection</description>
>         <res-ref-name>jdbc/db</res-ref-name>
>         <res-type>javax.sql.DataSource</res-type>
>         <res-auth>Container</res-auth>
>     </resource-ref>
> </web-app>
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org


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

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