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 Problem with context initialization ?
Date Tue, 21 Nov 2000 01:08:48 GMT
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)


Mime
View raw message