Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 94123 invoked from network); 21 Nov 2000 01:36:14 -0000 Received: from mercury.sun.com (192.9.25.1) by locus.apache.org with SMTP; 21 Nov 2000 01:36:14 -0000 Received: from shorter.eng.sun.com ([129.144.123.35]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id RAA00372 for ; Mon, 20 Nov 2000 17:36:14 -0800 (PST) From: cmanolache@yahoo.com Received: from costin.eng.sun.com (costin [129.144.251.103]) by shorter.eng.sun.com (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id RAA08886; Mon, 20 Nov 2000 17:36:13 -0800 (PST) Date: Mon, 20 Nov 2000 17:36:12 -0800 (PST) X-Sender: costin@costin To: tomcat-dev@jakarta.apache.org, Arieh Markel Subject: Re: Problem with context initialization ? In-Reply-To: <200011210108.SAA28873@amon.Central.Sun.COM> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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. 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) >