It's all about the answers!

Ask a question

CRJAZ1319E Read access is not permitted.


vikrant kamble (132251) | asked Apr 26 '16, 1:27 a.m.
 HI All, 
I am comparing baselines using java client api and fetching change sets,
Then I fetch work item of chagne set using below API

List<ILink> links = ChangeSetLinks.findLinks((ProviderFactory) teamRepository.getClientLibrary(ProviderFactory.class),sethandleforwi,
                    new String[] { ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID },null);
for (final ILink lk : links)
{
 
final Object resolved = lk.getTargetRef().resolve();
if (resolved instanceof IWorkItemHandle)
{
workItem = (IWorkItem) iItemManager.fetchCompleteItem((IWorkItemHandle)resolved,IItemManager.DEFAULT,null);
                                                      //throws exception at this line
}
                                         }

Exception thrown at this line is 

com.ibm.team.repository.common.PermissionDeniedException: CRJAZ1319E Read access

is not permitted. The user, myadmin, tried to read one or more items that have the following type: WorkItem

What is cause of this error, and how can i resolve this error.

Accepted answer


permanent link
Ralph Schoon (55.3k23642) | answered Apr 26 '16, 2:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 26 '16, 2:07 a.m.
The most likely cause is you don't have permission to read the work item, so you can get the handle but not resolve the item. Since RTC 3.x there are read permissions and a permission aware API. You can use IItemManager().fetchCompleteItemsPermissionAware(handleList,IItemManager.REFRESH, monitor) to make sure you know if you have access to objects or not. See https://rsjazz.wordpress.com/2015/10/28/build-artifacts-publishing-and-automated-build-output-management-using-the-plain-java-client-libraries/ for how it is used.
David Lafreniere selected this answer as the correct answer

Your answer


Register or to post your answer.