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

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

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.

0 votes



2 answers

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

0 votes


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

0 votes

Comments

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

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 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
× 10,952
× 43

Question asked: May 12 '15, 6:14 a.m.

Question was seen: 4,347 times

Last updated: May 20 '15, 5:25 a.m.

Confirmation Cancel Confirm