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?
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 13, 7:45 a.m.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.