I'm not convinced that that is the problem at all, and I don't think that anyone would 
want to delete conf/web.xml because it is not an example descriptor, it is the global 
descriptor that is inherited by all other web-applations. It defines a long list of 
default mime-types and other variables that I don't think programmers would want to 
enter separately into each individual web-app descriptor (web.xml).

My best guess is that this sudden death-on-startup of Tomcat has to do with servlets 
that have load-on-startup set to a value other than 0. For some reason, if I have 
load-on-startup for my own servlet, Tomcat crashes as previously described. If I 
commment that out, it starts up just fine, without removing conf/web.xml and even with 
other servlets (notably those that come with Apache AXIS) having load-on-startup 
specified. This leads me to believe that they implemented their servlets correcty and 
I did not. However, I was under the impression that all you have to do is supply the 
method init(). I have this method and init(ServletConfig) implemented and my servlet 
still crashes tomcat on startup if it has load-on-startup specified.

If anyone has any ideas as to why this is the case, I would be very grateful. 
Hopefully these details give further useful clues as to why some people have been 
getting this behavior from Tomcat 4.1.12. Thanks.

/S

-- 
Steven Cummings
Columbia, MO
Email: [EMAIL PROTECTED]
AIM:   cummingscs
ICQ:   3330114

-------------------------------------------------------------------



I just had a run in with the problem that other people
seem to be experiencing, and I think I have solved it.

Problem
-------
After a default installation of Tomcat 4.1.12, after
starting Tomcat, it immediatley shuts down before you
can see any backtrace in stdout (console window), and
there is nothing in /log.

Reason
------
Tomcat 4.1.12 default web.xml includes the examples
webapp even if you did not want it.

Evidence
--------
Using 'catalina debug'

C:\PROGRA~1\APACHE~1\TOMCAT~1.1\bin>catalina debug
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:       C:\j2sdk1.4.1
Initializing jdb ...

> run
run org.apache.catalina.startup.Bootstrap start
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Oct 1, 2002 4:26:16 PM
org.apache.commons.modeler.Registry loadRegis
try
INFO: Loading registry information
Oct 1, 2002 4:26:16 PM
org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Oct 1, 2002 4:26:16 PM
org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Oct 1, 2002 4:26:17 PM
org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 80
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12-LE-jdk14
java.lang.IllegalArgumentException: Document base
..\webapps\examples does not e
xist or is not a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:193)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
397)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:218
9)
        at
org.apache.catalina.startup.Catalina.start(Catalina.java:510)
        at
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

The application exited


Solution
--------
Delete the example webapp context from /conf/web.xml

Hope this helps!

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to