PDA

View Full Version : IndexOutOfBoundsException from AnnotationMethodHandlerAdapter



moores
Oct 11th, 2010, 07:32 PM
I migrated from 3.0.3 to 3.0.4 and ran an existing multi-threaded load test (jdk 1.6.0_20-b02) that started getting an IndexOutOfBoundsException from AnnotationMethodHandlerAdapter.

Running 20 threads on a single 16 core machine, making about 800 HTTP requests per second, I am getting the following trace about 1 of every 30,000 requests.

Is there a concurrency issue with the handling of the RequestMappingInfo.matchedPatterns attribute?




[WARNING] [talledLocalContainer] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[WARNING] [talledLocalContainer] at java.util.ArrayList.RangeCheck(ArrayList.java:547)
[WARNING] [talledLocalContainer] at java.util.ArrayList.get(ArrayList.java:322)
[WARNING] [talledLocalContainer] at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter$RequestMappingInfo.bes tMatchedPattern(AnnotationMethodHandlerAdapter.jav a:1017)
[WARNING] [talledLocalContainer] at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter$ServletHandlerMethodRe solver.resolveHandlerMethod(AnnotationMethodHandle rAdapter.java:613)
[WARNING] [talledLocalContainer] at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.invokeHandlerMethod(An notationMethodHandlerAdapter.java:422)
[WARNING] [talledLocalContainer] at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.handle(AnnotationMetho dHandlerAdapter.java:415)

mattswartley
Oct 13th, 2010, 10:15 AM
I'm running into the same Exception in my webapp when testing under load. There is a bug that appears to for the same problem (https://jira.springframework.org/browse/SPR-7525) that is scheduled to be released with version 3.0.5.

The status of this bug is resolved, but when I ran my test with the 3.0.5 snapshot version, I still get the same error.

Has anyone encountered this and checked to see if the fix in 3.0.5 addresses the issue? The author of the bug never responded that they successfully retested with 3.0.5.

Thanks,

Matt

mattswartley
Oct 14th, 2010, 02:40 PM
This is now fixed in the 3.0.5 snapshot (https://jira.springframework.org/browse/SPR-7525). I retested with the snapshot on 10/14/2010 and the IndexOutOfBoundsExceptions went away.

Thanks!

skoiloth
Jul 5th, 2012, 04:00 PM
Faced the same issue .When the an ajax refresh in every two seconds and after a while got this exception . Switched to 3.0.5 and solved the problem . Thanks.