jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • PicoContainer
  • PICO-367

java.lang.ArrayIndexOutOfBoundsException in org.picocontainer.DefaultPicoContainer.addOrderedComponentAdapter

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.8.3
  • Fix Version/s: 2.11.1
  • Component/s: PicoContainer (Java)
  • Labels:
    None

Description

We get this error intermittently when running our unit tests:

java.lang.ArrayIndexOutOfBoundsException: 11
at java.util.ArrayList.add(ArrayList.java:352)
at org.picocontainer.DefaultPicoContainer.addOrderedComponentAdapter(DefaultPicoContainer.java:465)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:585)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:535)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:547)

It has been happening at least from 2.6 ~ 2.8.3. Interestingly enough, when it happens, two tests fail with the same error, even though we recreate the container for every test method.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. SONAR-3275 ArrayIndexOutOfBoundsException in URL /chart

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Michael Rimov added a comment - 16/Apr/10 4:00 PM

It looks like you're triggering a race condition in addOrderedComponentAdapter(). I have attempted to fix this with a checkin with revisiong 5680. But I'm not 100% sure I've fixed all potential avenues for this condition.

If you would please give this version a try and let us know how it goes, we'd appreciate it. Thanks.

Show
Michael Rimov added a comment - 16/Apr/10 4:00 PM It looks like you're triggering a race condition in addOrderedComponentAdapter(). I have attempted to fix this with a checkin with revisiong 5680. But I'm not 100% sure I've fixed all potential avenues for this condition. If you would please give this version a try and let us know how it goes, we'd appreciate it. Thanks.
Hide
Permalink
Trejkaz added a comment - 16/Aug/10 6:08 PM

So far so good. I haven't seen the issue on my own machine for a couple of months now.

When is the next bugfix release due?

Show
Trejkaz added a comment - 16/Aug/10 6:08 PM So far so good. I haven't seen the issue on my own machine for a couple of months now. When is the next bugfix release due?
Hide
Permalink
Paul Hammant added a comment - 16/Aug/10 6:13 PM

http://repository.codehaus.org/org/picocontainer/picocontainer/2.11.1/ should be what you want

Show
Paul Hammant added a comment - 16/Aug/10 6:13 PM http://repository.codehaus.org/org/picocontainer/picocontainer/2.11.1/ should be what you want

People

  • Assignee:
    Michael Rimov
    Reporter:
    Trejkaz
Vote (0)
Watch (0)

Dates

  • Created:
    01/Nov/09 4:08 PM
    Updated:
    21/Feb/12 3:09 AM
    Resolved:
    02/Feb/11 8:13 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.