It's all about the answers!

Ask a question

org.eclipse.core.runtime.OperationCanceledException loading report resources on a new LCP CCM project, [Solved]


sam detweiler (12.5k6195201) | asked Mar 21 '14, 11:29 a.m.
edited Mar 21 '14, 4:25 p.m.
 we have built a LCP project creation automation tool.

it uses the REST apis to create an LCP project, using the sample provided here, 
https://jazz.net/wiki/bin/view/Main/LPAAPIExampleClient

all goes well. 

now we need to do some additional project area setup 
1. reparent the ccm project (created with unconfiged) to use the shared process area parent project
2. load the report resources. 

add users, and roles..  (1 has to be done before this, else project has no role definitions)

we have to logon to use the plainjava api, as you cannot do 1 or two thru REST.

I have standlone utilities that do 1 and two, so its a tuiny cut/paste to join them together..
(both  pgms are using the same plainjava libs, 4.0.4, to server 4.0.4, on the same eclipse)

but the loading the report resources fails with the operation canceled. call. 
the project area reparent works fine. 
error
logged in user =Sam Detweiler
there are 94 missing report definitions
adding report='workitems.MicroStoryPointsProgress'
adding report resorce failed for report=Micro Story Points Progress exception=null
org.eclipse.core.runtime.OperationCanceledException

this routine, a direct cut/paste from my standalone utility 
URI produri = URI.create(prodprojectAreaName.replaceAll(" ", "%20"));
IProjectArea iprja_prod = (IProjectArea) prodprocessClient.findProcessArea(produri, null, null);
if (iprja_prod != null)
{
IReportManager irptMgr = ((IReportManager) productionServer.getClientLibrary(IReportManager.class));
List<IReportDescriptor> missingreports = irptMgr.fetchMissingSharedReportDescriptors(
(IProcessAreaHandle) iprja_prod.getItemHandle(), null);
System.out.println("there are "+missingreports.size()+" missing report definitions");
for (IReportDescriptor report : missingreports)
{

try
{
System.out.println("adding resport='"+report.getId()+"'");
irptMgr.saveReportDescriptor(report, null);
}
catch (Exception e)
{
System.out.println("adding report resporce failed for report="+report.getName()+ " exception="+e.getMessage());
return(false);
}
}
}

this code works perfectly on the same project a little while (minute) later..
| edit: (worked  afterwards cause we had continued and added the users)



Comments
sam detweiler commented Mar 21 '14, 11:56 a.m. | edited Mar 21 '14, 12:02 p.m.

when using my original sample, I can make it fail the same way


1. if the project is archived
2. the project has no parent and thus no process area..  

we 'just' set the parent in the previous step.
and reloaded the project area (IProjectArea)

One answer



permanent link
sam detweiler (12.5k6195201) | answered Mar 21 '14, 12:18 p.m.
edited Mar 27 '14, 10:31 a.m.
this turned out to be a permissions error..

we had not added any users yet, so the everybody role took effect, and 'everybody' doesn't have permission to add report resources.

I opened defect 
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=309629

Comments
sam detweiler commented Mar 21 '14, 4:59 p.m.

can someone select this as the accepted answer.. thx 

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.