Bug 42643

Summary: Duplicate JSP function mapper variables
Product: Tomcat 5 Reporter: Cott Lang <cott>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 5.5.20   
Target Milestone: ---   
Hardware: Other   
OS: All   

Description Cott Lang 2007-06-12 07:34:16 UTC
When we deploy ~20 or so web apps at a time, we invariably end up with an app or
two on each server that has compilation errors due to code generated like this:

static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_1;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_2;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_3;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_4;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_5;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_6;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_7;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_1;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_2;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_3;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_4;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_5;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_6;
static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_7;

This looks like it might be as simple as unsynchronized access to the static
'currFunc' in ELFunctionMapper, but I'm far from an expert on this code and
unfortunately lack the time to become one. :)

This only appears to happen when we mass-deploy apps, and we can resolve it by
deleting the generated .java file and manually restarting the affected app.
Comment 1 Mark Thomas 2007-06-16 08:39:55 UTC
Thanks for the report. This has been fixed in svn and will be in 5.5.25 and
6.0.14 onwards.