DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16449>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16449 Race condition when compiling jsp pages ------- Additional Comments From [EMAIL PROTECTED] 2003-02-12 13:09 ------- Here you go, very easy way to reproduce the bug. here is a patch for JspWrapperServlet.java, all it does is a Thread.sleep() to make the condition easy to reproduce. --- /old/JspServletWrapper.java 2003-02-10 11:29:52.000000000 -0500 +++ /new/JspServletWrapper.java 2003-02-12 08:02:39.000000000 -0500 @@ -148,11 +148,14 @@ try { servletClass = ctxt.load(); + Thread.sleep(5000); theServlet = (Servlet) servletClass.newInstance(); } catch( IllegalAccessException ex1 ) { throw new JasperException( ex1 ); } catch( InstantiationException ex ) { throw new JasperException( ex ); + } catch ( InterruptedException e ) { + e.printStackTrace(); } theServlet.init(config); now if you run the admin webapp without the jsp pages being precompiled and rapidly click between two or three items in the tree as the pages are compiling you will see the stacktrace for the null pointer exception. The cause of this is still the sam, there is NO way around the flaws of the double check in java, let me repeat there is NO way around it. Any place you use the double check in java you will have a race condition. If you don't care to fix the bug that is your choice, but I feel the bug should be in a open or wontfix state, not a fixed state as the bug still does exist. thanks, john --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]