It's all about the answers!

Ask a question

GC with RQM projects - How to retrieve the component lists of a project area


Isabel Murakami (3811615) | asked Jul 18 '17, 11:04 a.m.

Using RQM603 with Global Configuration, we have tried to use plain java client library to retrieve the component lists of a project area.
We were able to retrieve requirement project's component list, but we got the following error message when we tried to retrieve component list from a RQM project.

=================run time error message=================================
Contacting https://rqm-qm-dev-n2.xxx.com:9443/qm/...
Connected to https://rqm-qm-dev-n2.xxx.com:9443/qm/
ProjectArea name:Integrated Development 1 (Quality Management)
com.ibm.team.repository.common.transport.ServiceNotAvailableException: CRJAZ0106E The server is temporarily unavailable. The request for the following URL was denied: /qm/service/com.ibm.team.scm.common.internal.IScmQueryService.
at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1266)
at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1121)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:660)
at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:605)
at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:548)
at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:202)
at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
at com.sun.proxy.$Proxy17.findWorkspaces(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110)
at com.sun.proxy.$Proxy17.findWorkspaces(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy$2.run(ScmServiceInterfaceProxy.java:168)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1328)
at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1323)
at com.ibm.team.scm.client.internal.ScmClientLibraryContext.callCancelableService(ScmClientLibraryContext.java:71)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invokeCancelableService(ScmServiceInterfaceProxy.java:164)
at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:92)
at com.sun.proxy.$Proxy17.findWorkspaces(Unknown Source)
at com.ibm.team.scm.client.internal.WorkspaceManager.findWorkspaces(WorkspaceManager.java:1953)
at RTC.ProcessUtil.getAllComponentNames(ProcessUtil.java:380)
at RTC.RTCrunner.getAllComponents(RTCrunner.java:85)
at ProjectAreaExe.main(ProjectAreaExe.java:75)
Exception in thread "main" java.lang.NullPointerException
at ProjectAreaExe.main(ProjectAreaExe.java:89)
================end of=run time error message=================================


===============source code================================================
public static List<String> getAllComponentNames(ITeamRepository teamRepository,IProgressMonitor progressMonitor ) throws TeamRepositoryException{
 List <String> componentList= new ArrayList<String>();
 IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(teamRepository);
 IWorkspaceSearchCriteria stcriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
 stcriteria.setKind(IWorkspaceSearchCriteria.STREAMS);
 IProcessItemService processService = (IProcessItemService)teamRepository.getClientLibrary(IProcessItemService.class);
List<IProjectArea> projectAreas = processService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null);
for (IProjectArea area : projectAreas) {
System.out.println("ProjectArea name:"+area.getName());

stcriteria.setPartialOwnerNameIgnoreCase(area.getName());
List <IWorkspaceHandle> workspaceHandles = workspaceManager.findWorkspaces(stcriteria,Integer.MAX_VALUE,progressMonitor);
if(!workspaceHandles.isEmpty()){
IWorkspaceConnection workspaceConnection = workspaceManager.getWorkspaceConnection(workspaceHandles.get(0),progressMonitor);
@SuppressWarnings("rawtypes")
List components = teamRepository.itemManager().fetchCompleteItems(workspaceConnection.getComponents(), IItemManager.DEFAULT, null);
for (Iterator<IComponent> it = components.iterator(); it.hasNext();) {
IComponent component = it.next();
componentList.add(component.getName());
System.out.println("Components: ");
System.out.println(component.getName());
}
}

}

return componentList;

}
===================end of source code ===============================

Please help- What's wrong with the code or what's wrong with the project setup.

One answer



permanent link
Kunhong Xu (115) | answered Jul 21 '17, 11:05 a.m.
  1. Is Relationship definition between project and component in RTC/DNG project the same in RQM project?
  2. In my RQM project, there is no control resource tab and workspace is shown under control resource in RTC and DNG project. Can RQM project have control resource tab in which workspace is listed. Components are listed under workspace.

Your answer


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.