DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38713>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38713





------- Additional Comments From [EMAIL PROTECTED]  2006-03-10 11:58 -------
We have the same problem. I think I managed to find out the cause: it only
happens if the JSP itself throws FileNotFoundException. So in order to
reproduce: have only one JSP in your Webapp like so:

<%!
  java.util.Random r = new java.util.Random();
%><% if(r.nextInt(10) > 0) throw new java.io.FileNotFoundException(); %>

and put some concurrent load on that JSP.

Evaluation: Jasper has a rather big catch block in JspServletWrapper.java and
will interpret any FNFE as an indication that the JSP itself has disappeared. It
will remove the JspServletWrapper which triggers a recompilation.

I'm pretty sure there is a race condition in that recompilation code that causes
two concurrent compilations for the same file. These two compilations would
fight over the generated files and lead to the observed bug. See the thread dump
below (taken after SDEInstaller hit a breakpoint in the offending line): two
compilations with different OIDs for JSPServletWrapper although the webapp has
only one JSP.


"http-16001-Processor22" daemon prio=10 tid=0x00764340 nid=0x23 waiting on
condition [0xedb7e000..0xedb7f9f0]
        at java.io.IOException.<init>(IOException.java:40)
        at java.io.FileNotFoundException.<init>(FileNotFoundException.java:46)
        at
org.apache.jasper.compiler.SmapUtil$SDEInstaller.<init>(SmapUtil.java:248)
        at
org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:236)
        at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:163)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:429)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        - locked <0xf1320090> (a org.apache.jasper.servlet.JspServletWrapper)


"http-16001-Processor25" daemon prio=10 tid=0x00767a50 nid=0x26 runnable
[0xed87d000..0xed87fc70]
        at java.net.URLStreamHandler.setURL(URLStreamHandler.java:505)
        at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:283)
        at sun.net.www.protocol.file.Handler.parseURL(Handler.java:50)
        at java.net.URL.<init>(URL.java:596)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:161)
        at java.net.JarURLConnection.<init>(JarURLConnection.java:144)
        at
sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:61)
        at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24)
        at java.net.URL.openConnection(URL.java:943)
        at java.net.URL.openStream(URL.java:1007)
        at
org.apache.catalina.loader.StandardClassLoader.getResourceAsStream(StandardClassLoader.java:679)
        at java.lang.Class.getResourceAsStream(Class.java:1998)
        at 
org.apache.tools.ant.ComponentHelper.initTypes(ComponentHelper.java:741)
        at
org.apache.tools.ant.ComponentHelper.initDefaultDefinitions(ComponentHelper.java:247)
        at org.apache.tools.ant.Project.init(Project.java:262)
        at org.apache.jasper.compiler.Compiler.getProject(Compiler.java:116)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        - locked <0xf0c4d448> (a org.apache.jasper.servlet.JspServletWrapper)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to