Got "CRJAZ1319E Read access is not permitted" when obtaining workspace from UUID
I want to retrieve each workspace which belongs to corresponding builddefinition.
I first got all the builddefinitions under a project area.
Then, I use the following code to get the workspace.
IBuildProperty iBuildProperty = iBuildDefinition.getProperty(IJazzScmConfigurationElement.PROPERTY_WORKSPACE_UUID);
if(iBuildProperty !=null){
IWorkspaceHandle wsHandle = (IWorkspaceHandle)
IWorkspace.ITEM_TYPE.createItemHandle(com.ibm.team.repository.common.UUID.valueOf(
iBuildProperty.getVal ue()) , null);
IWorkspace ws = (IWorkspace) repo.itemManager().fetchCompleteItem(wsHandle, IItemManager.DEFAULT,
null);
}
But sometimes I got the exception:"CRJAZ1319E Read access is not permitted. The user, , tried to read one or more items that have the following type: Workspace".
But I do have the permission to read them on my Eclipse.
Why is it?
Thanks!