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

Error response in OSLC DM query

Hi,

I'm trying to execute Sample code from lyo.client > DMFormSample.java
I'm sure all of the argument values are correctly set and this class is able to Authenticate on JTS.
But this query response is
"
HTTP 400: Bad Request

_in predicate value array is empty
Caused by (IllegalArgumentException): _in predicate value array is empty

    
"

Code snapshot :

//STEP 3: Login in to Jazz Server
            if (client.login() == HttpStatus.SC_OK) {

                //STEP 4: Get the URL of the OSLC ChangeManagement catalog
                String catalogUrl = helper.getCatalogUrl();

                //STEP 5: Find the OSLC Service Provider for the project area we want to work with
                String serviceProviderUrl = client.lookupServiceProviderUrl(catalogUrl, projectArea);

                //STEP 6: Get the Query Capabilities URL so that we can run some OSLC queries
                String queryCapability = client.lookupQueryCapability(serviceProviderUrl,
                                                                      OSLCConstants.OSLC_AM_V2,
                                                                      OSLCConstants.AM_RESOURCE_TYPE);

                //SCENARIO A: Run a query for all AM Resources with OSLC paging of 10 items per
                //page turned on and list the members of the result

                OslcQueryParameters queryParams = new OslcQueryParameters();

                OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);

                OslcQueryResult result = query.submit();

                processPagedQueryResults(result,client, processAsJavaObjects);

                System.out.println("\n------------------------------\n");

                //TODO:  Add more DM scenarios
            }



Any direction troubleshooting this further could be great help.
Thanks in Advance!
Warm Regards,
Jay

0 votes

Comments

The important information would be the query URI with parameters and encoding. The error is about an _in  predicate and I don't see the Query URI created with such a predicate. The QueryParams are empty.

Hi Ralph,
Thanks for your response!
I have included query parameter as follows and still result is same.

Code snap where query parameter included

                OslcQueryParameters queryParams = new OslcQueryParameters();

                queryParams.setSelect(OSLCConstants.DCTERMS_ID + "," + OSLCConstants.DCTERMS_MODIFIED);
                OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);


Sorry, no idea I can't seem to understand where the _in comes from.
I suspect that you are the API incorrectly. The API, even if it contains OSLC is not an OSLC query it is similar to /oslc/queries.xml? in RTC in https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Using_Stored_Queries

This is not OSLC, despite it mentions that and I am not sure if you use the wrong framework.


Sorry. I can't help.


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,940
× 7,498
× 1,328
× 516
× 411

Question asked: Oct 14 '21, 1:47 p.m.

Question was seen: 1,497 times

Last updated: Oct 21 '21, 4:40 a.m.

Confirmation Cancel Confirm