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

Error in Moving versionables between Component

Hello,

We are trying to move files between components in a workspace using workspaceConnection.moveVersionablesBetweenComponents method


our method:


IComponentHandle compHandleFrom = getComponentHandle(srcComponentExactNameSFM);

IComponentHandle compHandleTo = getComponentHandle(trgComponentExactNameSys);

IComponent component = (IComponent) teamRepository.itemManager().fetchCompleteItem(compHandleFrom,

IItemManager.DEFAULT, monitor);

String sourceComment = "Moving files from source to target";

String targetComment = sourceComment;


String repositoryWorkspaceName = "Example Workspace";

IWorkspaceConnection workspaceConnection = findStreamORRepositoryWorkspaceByName(teamRepository,

repositoryWorkspaceName, 2, monitor);


IConfiguration compConfigForSource= workspaceConnection.configuration(compHandleFrom);

IFolderHandle parentForSourceComp = compConfigForSource.rootFolderHandle(monitor);

Map<String, IVersionableHandle> versionableMapForSource = getVersionablesforAllFiles(compConfigForSource, component,parentForSourceComp , monitor);

IVersionableHandle[] filesToMove = getFilesToMove(functionsList, monitor, versionableMapForSource);


IConfiguration compConfigForTargetComp = workspaceConnection.configuration(compHandleTo)

IFolderHandle parentForTargetComp = compConfigForTargetComp.rootFolderHandle(monitor);

IFolderHandle[] targetFolderHandle =getFolderHandleForTarget(parentForTargetComp,compConfigForTargetComp, monitor);

IUpdateReport report = workspaceConnection.moveVersionablesBetweenComponents(compHandleFrom,compHandleTo,filesToMove, targetFolderHandle, sourceComment, targetComment, monitor);


We are getting this error at workspaceConnection.moveVersionablesBetweenComponents(compHandleFrom,compHandleTo,filesToMove, targetFolderHandle, sourceComment, targetComment, monitor); 

error is

Exception in thread "main" com.ibm.team.repository.common.TeamRepositoryException: Internal error

at com.ibm.team.scm.client.internal.WorkspaceConnection.moveVersionablesBetweenComponents(WorkspaceConnection.java:857)

at com.ibm.team.scm.client.internal.WorkspaceConnection.moveVersionablesBetweenComponents(WorkspaceConnection.java:840)

at com.moveFilesToSystemComponent(DataMigrator.java:111)

at com..DataMigrator.main(DataMigrator.java:61)

Caused by: java.lang.IllegalArgumentException

... 4 more


Do you know any ways to resolve this error?

0 votes

Comments

The only hint I can provide is to perform the EWM/RTC Extensions Workshop Lab 1 to set up a workspace that has the SDK and the Plain Java Client Libraries set up correctly. Then debug your code.


See https://rsjazz.wordpress.com/2024/02/09/ewm-rational-team-concert-extensions-workshop-changes-for-7-0-3/ for current changes and where to find the Extensions Workshop.


Be the first one to answer this question!

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,938

Question asked: May 10, 6:33 a.m.

Question was seen: 458 times

Last updated: May 13, 7:45 a.m.

Confirmation Cancel Confirm