I've been doing some more testing and added a bunch of "System.out.println" 
statements to the "init", "init(ServletConfig)", and "doPost/doGet" methods so 
that I could see what my application was doing without log4j initialized.

Basically when I restart Tomcat, it doesn't call any of the "init" methods of 
the Servlet, however it does load it partially.  When I actually browse to the 
URL of the Servlet, I can see my "System.out.println" statements being output 
to catalina.out, however all of the initialization which was to be performed by 
the "init" methods was never done.

When I copy the existing war file from the webapps directory to another 
location, update the modify timestamp and then move it back into the webapps 
directory, the "init" methods are then called and the application works 
properly.


> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Tomcat 6.0.18 Servlet Loading/Reloading
> Date: Wed, 3 Dec 2008 19:22:15 -0500
> 
> 
> Hello,
> 
> I have a very strange issue with Tomcat 6.0.18 and I'm not sure what 
> information to provide to help debug further.
> 
> I have an installation of Tomcat 6.0.18 which fails to properly initialize 
> servlets upon restart. If I deploy a new application.war file while Tomcat is 
> running (even if it is the same war file with different modify timestamp) 
> everything loads up just fine.  Below are the system details:
> 
>   - Tomcat: Tomcat version 6.0.18 with APR 1.1.14
>   - Java: JDK 1.6u10
>   - RedHat Enteprise Linux 5
> 
> It seems that Servlet X, for example, does load to a point, because it 
> returns a value, however the log4j subsystem is not initialized at all 
> (providing me with no debug info at all) and catalina.out/err show no signs 
> of trouble.  Below is a snippet of restarting Tomcat.
> 
> =====
> Dec 3, 2008 7:08:36 PM org.apache.coyote.http11.Http11AprProtocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-80
> Dec 3, 2008 7:08:37 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextDestroyed()
> Dec 3, 2008 7:08:37 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextDestroyed()
> Dec 3, 2008 7:08:37 PM org.apache.coyote.http11.Http11AprProtocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-80
> Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
> Dec 3, 2008 7:08:43 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
> random [true].
> Dec 3, 2008 7:08:43 PM org.apache.coyote.http11.Http11AprProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-80
> Dec 3, 2008 7:08:43 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 562 ms
> Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Dec 3, 2008 7:08:43 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
> Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Dec 3, 2008 7:08:44 PM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Dec 3, 2008 7:08:44 PM org.apache.coyote.http11.Http11AprProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-80
> Dec 3, 2008 7:08:44 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 1432 ms
> AbandonedObjectPool is used ([EMAIL PROTECTED])
>    LogAbandoned: false
>    RemoveAbandoned: true
>    RemoveAbandonedTimeout: 60
> =====
> 
> Then once I move a new .war file into the webapps directory:
> 
> =====
> Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/thewebapplication]
> Dec 3, 2008 7:20:25 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive thewebapplication.war
> =====
> 
> Has anyone else ever experienced this before and can provide some help?
> 
> Kind regards,
> 
> Justin
> 
> _________________________________________________________________
> 

_________________________________________________________________

Reply via email to