Re: Problem with context initialization ?
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > list-help: <mailto:[EMAIL PROTECTED]> > list-unsubscribe: <mailto:[EMAIL PROTECTED]> > list-post: <mailto:[EMAIL PROTECTED]> > Delivered-To: mailing list [EMAIL PROTECTED] > From: [EMAIL PROTECTED] > X-Sender: costin@costin > To: [EMAIL PROTECTED], Arieh Markel <[EMAIL PROTECTED]> > 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 Storage500 Eldorado Blvd. MS UBRM11-194 > > e-mail: [EMAIL PROTECTED] 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 Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Let's go Panthers Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Re: Problem with context initialization ?
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 Storage500 Eldorado Blvd. MS UBRM11-194 > e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 > Let's go Panthers Phone: (303) 272-8547 x78547 > (e-mail me with subject SEND PUBLIC KEY to get public key) >
Re: Problem with context initialization ?
A better Exception trace follows (note the message) (the following is the tomcat console output) 2000-11-20 06:05:17 - Ctx( ): Exception in: R( + /login + null) - java.lang.ExceptionInInitializerError: java.lang.NullPointerException at 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) Consider this the initial exception thrown. Arieh -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Let's go Panthers Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Problem with context initialization ?
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 Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Let's go Panthers Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)