It's all about the answers!

Ask a question

Error in Moving versionables between Component

Yukti Bhat (261) | asked May 10, 6:33 a.m.
edited May 10, 6:40 a.m.


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" Internal error



at com.moveFilesToSystemComponent(

at com..DataMigrator.main(

Caused by: java.lang.IllegalArgumentException

... 4 more

Do you know any ways to resolve this error?

Ralph Schoon commented 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.

See for current changes and where to find the Extensions Workshop.

Be the first one to answer this question!

Register or 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.