It's all about the answers!

Ask a question

Cannot save workItem stale data exception


Yun Zheng (1112) | asked Dec 09 '15, 9:32 p.m.
edited Dec 10 '15, 2:17 a.m. by Ralph Schoon (56.8k23642)
When I trying to add some comments to a workItem in RTC using Java API, it always popped up the following error. Could anyone help me how to avoid such kind of error? Thanks.
 09-Dec-2015 14:11:04.441 WARNING [EjbTimerPool - 1] com.ibm.isvt.defects.service.RtcSummaryService.addComments FAIL: Exception saving work item com.ibm.team.workitem.common.model.MultiStaleDataException: Stale Data at com.ibm.team.workitem.common.internal.util.Utils.checkSaveResult(Utils.java:264) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveWorkItems(WorkItemWorkingCopyRegistry.java:2321) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveAffected(WorkItemWorkingCopyRegistry.java:2203) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2086) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2047) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyManager.save(WorkItemWorkingCopyManager.java:122) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyImpl.save(WorkItemWorkingCopyImpl.java:233) at com.ibm.isvt.defects.rtc.WorkItemTransaction.addComments(WorkItemTransaction.java:166) at com.ibm.isvt.defects.service.RtcSummaryService.addComments(RtcSummaryService.java:127) at sun.reflect.GeneratedMethodAccessor471.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) at java.lang.reflect.Method.invoke(Method.java:620)

One answer



permanent link
Ralph Schoon (56.8k23642) | answered Dec 10 '15, 2:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Some operation has done an update to the work item. You need to resolve/fetch the work item again, short before you try to manipulate it. See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/

Your answer


Register or to post your answer.