[closed] 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(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);
We are getting this error at workspaceConnection.moveVersionablesBetweenComponents(compHandleFrom,compHandleTo,filesToMove, targetFolderHandle, sourceComment, targetComment, monitor); line
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
Do you know any ways to resolve this error?
The question has been closed for the following reason: "Duplicate Question" by rschoon May 10, 6:47 a.m.