Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Get ItemNotFoundException when retrieving Ichange(IVersionable)

I want to retrieve all the changed files in the changeset.

After I got a ChangeSet object "changeset", I use the following statement to get the change list.

List<?> changeList = changeSet.changes();

Then, for each IChange object, I use the following statement to get IVersionable object.

IVersionableHandle iVersionableHandle =  ((IChange) change).item();
IConfiguration fConfiguration = RTCService.workspaceManager().getWorkspaceConnection(stream, null).configuration(component);

IVersionable iVersionable = fConfiguration.fetchCompleteItem(iVersionableHandle, null);
System.out.println(iVersionable.getName());
IFolderHandle iFolderHandle = iVersionable.getParent();
IFolder iFolder = (IFolder) fConfiguration.fetchCompleteItem(iFolderHandle, null);
System.out.println(iFolder.getName());

But sometimes fConfiguration.fetchCompleteItem(iVersionableHandle, null); throws ItemNotFoundException  even if I can see the files are there on RTC Web Page(History -> Open Full Change Set).

Do I do something wrong or what happened?

Thanks

1

0 votes



One answer

Permanent link
I then use fConfiguration.determineAncestorsInHistory(iVersionableHandleList, null); to get the paths.
And the result is reasonable. I think maybe it's the right way to do this

Thanks!

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Oct 07 '14, 10:18 p.m.

Question was seen: 3,121 times

Last updated: Oct 08 '14, 2:27 a.m.

Confirmation Cancel Confirm