Project: Tomcat
Bug 42643 Duplicate JSP function mapper variables
Reported: 2007-06-12 07:34:16 | Status: resolved fixed

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.

Files changed in fix:
java/org/apache/jasper/compiler/ELFunctionMapper.java