Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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)

0 votes



3 answers

Permanent link
Is the creation by program or is that a log output?

0 votes

Comments

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...)


Permanent link
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. 

0 votes

Comments

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
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,130
× 1,700

Question asked: Jun 15 '12, 1:22 a.m.

Question was seen: 5,941 times

Last updated: Jun 15 '12, 6:11 a.m.

Confirmation Cancel Confirm