OslcQueryResult .getMembers() and .getMembersUrls() return null


I’m trying to query Test Cases from Jazz based on the examples provided in:

I tried to use .getMembers() and .getMembersUrls() functions but they return null. Using .getRawResponse() I managed to make it work, but this solution does not support pagination and I want to cover this case as well.

My code looks like this:

    String serviceProviderUrl = oslcClient.lookupServiceProviderUrl(catalogUrl, projectAreaName);
    String queryCapability = oslcClient.lookupQueryCapability(
            serviceProviderUrl, OSLCConstants.OSLC_QM_V2,

    OslcQueryParameters queryParams = new OslcQueryParameters();
    if(conditions != null){
    if(testCaseProperties != null){

    OslcQuery query = new OslcQuery(oslcClient, queryCapability, queryParams);
    OslcQueryResult result = query.submit();

    testCases = processPagedQueryResult(result);

and processPagedQueryResult function:

private static List<TestCase> processPagedQueryResult(OslcQueryResult result){
    List<TestCase> testCases = new ArrayList<>();

    int page = 1;
    do {

        for (TestCase testCase : result.getMembers(TestCase.class)) {

        if (result.hasNext()) {
            result = result.next();
        } else {
    } while(true);

    return testCases;

Did I miss something?

I am also experiencing something similar when I want to get the Related Change Requests (using .getRelatedChangeRequests()) from a Test Plan (it also returns a null list even though in the Jazz interface I can see the links in the Test Plan)

Thank you,

1 Like

Hello Ana,

Did you run https://github.com/OSLC/lyo-samples/blob/master/oslc4j-client-samples/src/main/java/org/eclipse/lyo/oslc4j/client/samples/ETMSample.java exactly or change it in some way?

I just tried it just now with a debugger and it seems to return some valid values for both methods:

You may need to check the configuration of your server and the code of the org.eclipse.lyo.client.query.OslcQueryResult#getMembersUrls method where you can see that it will uses org.eclipse.lyo.client.query.OslcQueryResult#getMemberSelector to select a membership property (org.eclipse.lyo.client.query.OslcQueryResult#DEFAULT_MEMBER_PROPERTY by default).


1 Like