It's all about the answers!

Ask a question

Error when specifying a subset of properties in IProcessItemService.findAllProjectAreas(peroperies, ...)


Krasimir Malchev (56521) | asked Nov 22 '16, 4:12 a.m.
edited Nov 22 '16, 4:13 a.m.
Environment RTC 5.0.2 Plain Java API
 I would like to get all project areas in a repository using IProcessItemService.findAllProjectAreas(Collection properties, IProgressMonitor monitor) , but with a subset of properties: name of the project area and its description.
Therefore I pass the following value to the first parameter of the above method:
Collection properties = Arrays.asList(new String[] {IProjectArea.NAME_PROPERTY_ID, IProjectArea.DESCRIPTION_DETAILS_PROPERTY_ID});

I get the following error, but I don't have any any idea what could be the reason.
Can you please help me resolve this issue?

Thanks in advance!

Exception in thread "main" java.lang.IllegalArgumentException: Invalid property name list. The property list includes the name "descriptionDetails" but that is not a valid property for the com.ibm.team.process#ProjectArea item type.
at com.ibm.team.repository.service.internal.RepositoryItemService.assertValidPropertyNames(RepositoryItemService.java:1767)
at com.ibm.team.repository.service.internal.RepositoryItemService.assertValidPropertyNames(RepositoryItemService.java:1756)
at com.ibm.team.repository.service.internal.RepositoryItemService.fetchItemsPermissionAware(RepositoryItemService.java:625)

One answer



permanent link
Ralph Schoon (61.5k33643) | answered Nov 22 '16, 4:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 I think the error message says it all: 

Exception in thread "main" java.lang.IllegalArgumentException: Invalid property name list. 

The property list includes the name "descriptionDetails" but that is not a valid property for the com.ibm.team.process#ProjectArea item type.

I don't have an idea what would be allowed, but apparently what you try is not. It might be a good idea to search for other examples of the call and maybe looking at the IProjectArea for more information about its property.

Comments
Krasimir Malchev commented Nov 23 '16, 4:23 a.m.

I have been searching for a description of properties that can be passed to the method "findAllProjectAreas(Collection,...)", but unfortunately without any success (nether in the Plain Java documentation nor in the RTC source code). I couldn't manage to find any examples in internet, as well. I expected that all properties of the kind IProjectArea.<property name>_PROPERTY_ID (all properties such as IProjectArea.DESCRIPTION_DETAILS_PROPERTY_ID) should work, but only some of them do. The example does not. I assume that I am missing something, but I have not managed to identify it up to that moment.

Regards,
 Krasimir Malchev

Your answer


Register or to post your answer.