tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@central.sun.com>
Subject Re: Problem with context initialization ?
Date Tue, 21 Nov 2000 16:57:21 GMT

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: cmanolache@yahoo.com
> X-Sender: costin@costin
> To: tomcat-dev@jakarta.apache.org, Arieh Markel <Arieh.Markel@central.sun.com>
> Subject: Re: Problem with context initialization ?
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Hi Arieh,
> 
> I know about this problem, and 3.3 is going to fix this ( and other
> similar problems ) by defining a startup order and changing the code 
> to implement it.
> 
> I don't know any simple fix for 3.2, there is a lot of code that has to be
> changed.

Luckily, as you can see from the stack trace, the exception is caused
inside of a base class that we have defined (CMCServlet), when trying to access
a static method in another class that we have defined (ServerUtils).

I believe I should be able to catch the NoClassDefFoundError at the
appropriate time.

I am trying to find out what are the actions that I may take to correct
the problem when catching the error.

In essence, what in the API is there to perhaps force a reload/re-init
of the Context that is giving me the problem.

Any ideas ?

Arieh

> 
> Costin 
> 
> On Mon, 20 Nov 2000, Arieh Markel wrote:
> 
> > We are running into the following problem:
> > 
> > . we start Tomcat in an embedded manner:
> > 
> > 	use a server.xml that only includes interceptors and connectors
> > 	
> > 	create contexts programmatically
> > 	
> > 	initialize the context manager
> > 	
> > 
> > I am observing the following behavior:
> > 
> >   the tomcat is making the ports available before the context finished
> >   being initialized.
> >   
> >   On trying to access the application at that time, we get the following  
> >     
> > java.lang.NoClassDefFoundError: com/sun/esm/web/server/ServerUtils
> >         at com.sun.esm.web.servlet.CMCServlet.service(CMCServlet.java:354)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at 
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387)
> >         at org.apache.tomcat.core.Handler.service(Handler.java:263)
> >         at 
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371)
> >         at 
> > 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:787)
> >         at 
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:733)
> >         at 
> > 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
> > ctionHandler.java:210)
> >         at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
> >         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled 
Code)
> >         at java.lang.Thread.run(Compiled Code)
> >         
> >  
> >   From that moment on, we are never able to access the webserver, getting
> >   the same message again and again.
> >   
> > -----
> > 
> > It appears that there is a race condition on the ContextManager.start()
> > method.
> > 
> > I instrumented my context manager startup to print when the return
> > from ContextManager.start occurs.
> > 
> > I try to access my initial page (which is actually a servlet)
> > repeatedly from a browser trying to catch the point in time where
> > the connector is made available by the contexts are not.
> > 
> > When I manage to access the port on the connector
> > the result is the above exception.
> > 
> > Does anybody else see something similar ?
> > 
> > -----
> > 
> > Arieh       
> > --
> >  Arieh Markel		                Sun Microsystems Inc.
> >  Network Storage                        500 Eldorado Blvd. MS UBRM11-194
> >  e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
> >  Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
> >  (e-mail me with subject SEND PUBLIC KEY to get public key)
> > 

--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message