[
https://issues.apache.org/jira/browse/GERONIMO-5683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932090#action_12932090
]
Jarek Gawor commented on GERONIMO-5683:
---------------------------------------
Seems like the easiest solution is just to synchronize
GeronimoTldLocationsCache.init() since it only needs to execute once.
> Thread safety for needScanJar(), scanJar(), and scannedJars.add() in
> GeronimoTldLocationsCache
> -----------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5683
> URL: https://issues.apache.org/jira/browse/GERONIMO-5683
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.6, 2.2.1, 3.0-M1
> Environment: geronimo tomcat assembly 2.1.7
> Reporter: Ashish Jain
> Assignee: Ashish Jain
> Fix For: 2.1.7, 2.2.2, 3.0
>
>
> The following error is encountered under heavy load when there are multiple
> threads accessing "GeronimoTldLocationsCache.scanJars".
> java.lang.ArrayIndexOutOfBoundsException
> at java.util.ArrayList.ensureCapacity(ArrayList.java:196)
> at java.util.ArrayList.add(ArrayList.java:377)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:479)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.scanJars
> (GeronimoTldLocationsCache.java:457)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.init
> (GeronimoTldLocationsCache.java:218)
> at org.apache.geronimo.jasper.GeronimoTldLocationsCache.getLocation
> (GeronimoTldLocationsCache.java:209)
> at org.apache.jasper.JspCompilationContext.getTldLocation
> (JspCompilationContext.java:550)
> at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
> 430)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.