Getting IndexOutOfBoundsException while creating a workitem in RTC
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)
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
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.