ConcurrentModificationException in IWorkItem.setValue
![]()
We have a user that's encountering a java.util.ConcurrentModificationException in an IWorkItem.setValue call in our standalone Java application. Here's the stack trace:
Throwable occurred: java.lang.UnsupportedOperationException: Failed to create/update work item Does anyone know what might be causing this exception? Or can someone at least give me some hints as what to look at in debugging this problem. I'm pretty sure that our code doesn't make concurrent updates to the IWorkItem. |
4 answers
![]()
Hi Geoff,
What are the action performed in the code? please paste the code here. All the users are getting this error while performing similar actions - is it a repeating error? Thanks. |
![]()
I've only seen this problem in one user's environment; no other user has reported it, and I'm unable to reproduce it in my local environment.
Our Java application is a long running application that periodically polls (queries) an external data repository for new and changed data and creates and updates custom work items in RTC with this data. Our custom work items contain dozens of attributes. Here's the code that updates the work item attributes: protected void fieldsToWorkItem( ArtifactRecordPart rec, IWorkItem workItem ) |
![]()
Is this error repeating for that particular user atleast? (or) was it the only 1 time he faced it?
If it was only once, could have been some attribute's particular change would have caused it. Thanks. |
![]()
Since the call to setValue() is inside of a loop, could it be that the same attribute is attempted to be set multiple times within the same loop? While this would really be a sequential update to the same attribute value, if there is some flag or something that tries to restrict modification of an attribute until after a save has been done, this could explain it.
I don't know the internal rules for setValue() though - whether multiple sequential calls to setValue() for the same attribute are supposed to work or not. |
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.