I have the similar problem - org.apache.catalina.startup.ContextConfig -
Missing application web.xml, using defaults only. The app is not deployed.
The war is uploaded and context.xml is copied. It only happens in tc 5.5. I
haven't done a search thru tomcat-user list. Maybe it has already been
answered.
 
 

-----Original Message-----
From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] 
Sent: February 14, 2005 10:37 AM
To: tomcat-user@jakarta.apache.org
Subject: 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/
<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:[EMAIL PROTECTED] 
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
<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
<http://java.sun.com/xml/ns/j2ee> "
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
<http://java.sun.com/xml/ns/j2ee>
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
<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)
!DSPAM:4210c5dc274945841812518! 

Reply via email to