It's all about the answers!

Ask a question

TeamRepositoryException: Cannot close change set that is not active in workspace or in suspended list


SEC Servizi (97122752) | asked May 12 '15, 6:14 a.m.
edited May 12 '15, 6:18 a.m.
We have a custom follow up action extending the operation "com.ibm.team.scm.server.deliver" so when a delivery in to a stream occurs, then the current change sets are promoted to a "mirror" stream, too.
We used this server extension since RTC v2.0.0.2, but now that we migrated to RTC v4.0.7 an exception is thrown:
com.ibm.team.repository.common.TeamRepositoryException: Cannot close change set that is not active in workspace or in suspended list
We found this exception is thrown by "com.ibm.team.scm.service.internal.operations.CloseChangeSetsOperation" as:
if( cs.isActive() || checkActive )
throw ChangeSetUtils.COMPLETED_CHANGE_SET.createException(Messages.getString("CloseChangeSetsOperation.1"), csh); //$NON-NLS-1$
We tried to change the change sets status to not active as well as to close the change sets before the deliver operation, but these didn't do the trick...
Any advice?
Thanks in advance.

2 answers



permanent link
Surya Tripathi (65017) | answered May 12 '15, 2:39 p.m.
edited May 12 '15, 8:53 p.m.
When you are making a call to close the changesets, you may be passing 'checkActive' parameter as true. 
Here is a javadoc for 'checkActive' -
if <code>true</code>, checks that all of the given change sets
     *            are among this workspace's set of active change sets or active
     *            in the suspended set of the workspace.  If any of them do not
     *            meet this criteria, throws TeamRepositoryException.
     *            If <code>false</code>, the check is skipped.  Skipping the
     *            check is useful for callers that just want to ensure that a
     *            change set is closed, whether or not it started out as active.

May be, you should try passing this parameter as 'false'.


permanent link
SEC Servizi (97122752) | answered May 13 '15, 3:37 a.m.
edited May 13 '15, 4:07 a.m.
Should we call the service:
com.ibm.team.scm.common.IScmService#closeChangeSets
with input parameter checkActive=false, before we call the service:
com.ibm.team.scm.common.IScmService#deliverCombined
Thanks in advance.

Comments
Surya Tripathi commented May 13 '15, 3:54 p.m.

Yes, that would be my understanding. If it still does not work for you, please submit a defect. . 


SEC Servizi commented May 20 '15, 5:25 a.m.
Invoking the IScmService#closeChangeSets before the IScmService#deliverCombined cause a stale data exception:
CRJAZ6054E The operation cannot be run because the repository contains a newer version of the item it tried to modify. Refresh from the repository and try the operation again.

Your answer


Register or to post your answer.