[closed] Error in Moving versionables between Component
Yukti Bhat (26●1)
| asked May 10, 6:32 a.m.
closed May 10, 6:47 a.m. by Ralph Schoon (63.3k●3●36●46)
Hello,
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(compConfigForSFM, 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);
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.mercedes.datamigrator.DataMigrator.moveFilesToSystemComponent(DataMigrator.java:111) at com.mercedes.datamigrator.DataMigrator.main(DataMigrator.java:61) Caused by: java.lang.IllegalArgumentException
... 4 more
|