Hello,
I am trying to create a java program to get run a shared query. I am able to get the IQueryDescriptor object pertaining to the query selected by user. But when I am trying to get the result am getting exception (org.eclipse.core.runtime.AssertionFailedException: assertion failed).
Version being used : 6.0.1
PFB the function to get the result set
public static void getResultSet(ITeamRepository repository,IQueryDescriptor query)
{
try
{
IWorkItemClient workItemClient = (IWorkItemClient) repository.getClientLibrary(IWorkItemClient.class);
IQueryClient queryClient = workItemClient.getQueryClient();
ItemProfile loadProfile = IQueryDescriptor.FULL_PROFILE;
IQueryResult<IResolvedResult<IWorkItem>> resolvedResults = queryClient.getResolvedQueryResults(query, loadProfile);
long processed = 0;
System.out.println("Size : " + resolvedResults.getResultSize(null).getTotal());
while(resolvedResults.hasNext(null))
{
IResolvedResult<IWorkItem> result = resolvedResults.next(null);
IWorkItem item = result.getItem();
System.out.println(item.getItemId());
processed++;
}
System.out.println("Processed : " + processed);
}
catch(Exception e)
{
System.out.println("Exception : " + e.getMessage());
e.printStackTrace();
}
}
Getting exception -
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
at com.ibm.team.workitem.common.internal.util.AuditablesHelper.assertItemType(AuditablesHelper.java:98)
at com.ibm.team.workitem.common.internal.util.AuditablesHelper.getProperties(AuditablesHelper.java:77)
at com.ibm.team.workitem.client.internal.AuditableClient.doResolveAuditables(AuditableClient.java:173)
at com.ibm.team.workitem.client.internal.AuditableClient.resolveAuditables(AuditableClient.java:144)
at com.ibm.team.workitem.common.internal.query.QueryCommon.resolveAuditables(QueryCommon.java:314)
at com.ibm.team.workitem.client.internal.QueryClient.resolveAuditables(QueryClient.java:135)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.createIterator(ResolvingQueryResultIterator.java:142)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.update(ResolvingQueryResultIterator.java:125)
at com.ibm.team.workitem.common.internal.query.ResolvingQueryResultIterator.nextPage(ResolvingQueryResultIterator.java:101)
Could someone please tell me how to remove the exception.
Thanks in advance !!!