It's all about the answers!

Ask a question

Getting IndexOutOfBoundsException while creating a workitem in RTC


Atul Kumar (1872329) | asked Jun 15 '12, 1:22 a.m.
Hi,

I'm using RTC 3.0.1, and we have our own custom workitem type. I'm creating custom attributes programmatically. After doing so, when I try to create workitems of that particular type, I get IndexOutOfBoundsException. Checked the project area to find that the custom attributes were added correctly.

Exception running 'Creating Work Item'

java.lang.IndexOutOfBoundsException: Index: 48, Size: 48
    at java.util.ArrayList.RangeCheck(ArrayList.java:572)
    at java.util.ArrayList.get(ArrayList.java:347)
    at com.ibm.team.workitem.client.internal.AuditableClient.resolveAuditablesPermissionAware(AuditableClient.java:180)
    at com.ibm.team.workitem.common.internal.WorkItemCommon.createWorkItem(WorkItemCommon.java:191)
    at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.createNewUnconnected(WorkItemWorkingCopyRegistry.java:586)
    at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.connectNew(WorkItemWorkingCopyRegistry.java:580)
    at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyManager.connectNew(WorkItemWorkingCopyManager.java:94)
    at com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:230)
    at com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:189)
    at com.ibm.team.workitem.rcp.ui.internal.actions.NewWorkItemAction$2.runProtected(NewWorkItemAction.java:338)
    at com.ibm.team.foundation.client.util.FoundationJob.run(FoundationJob.java:68)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

3 answers



permanent link
Ralph Schoon (63.1k33646) | answered Jun 15 '12, 6:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I did create attributes with program code, but never ended in a state like this. I have no Idea what you need to do to fix that.

permanent link
Ralph Schoon (63.1k33646) | answered Jun 15 '12, 3:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If this is in your code, my assumption is that your code has an issue. Try to create such a work item by hand. If that works check your code. You could provide the code for inspection. I would also suggest to use a debugger to understand the indexes. I assume you call to AuditableClient.resolveAuditablesPermissionAware() is wrong. Maybe the list of items is empty. 

Comments
Atul Kumar commented Jun 15 '12, 4:40 a.m.

I'm not creating workitems through code. My code only adds custom attributes to the project area. The error is received while attempting to create a workitem manually.


permanent link
Ralph Schoon (63.1k33646) | answered Jun 15 '12, 3:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Is the creation by program or is that a log output?

Comments
Atul Kumar commented Jun 15 '12, 3:32 a.m.

The attribute creation is done by the program. The log output I posted was returned when I tried to create a workitem of that particular custom type. (Project Area->WorkItems->New WorkItem...)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.