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
}
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
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 15 '21, 2:16 a.m.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.
Jayesh Gaikar
Oct 15 '21, 9:50 a.m.OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams.setSelect(OSLCConstants.DCTERMS_ID + "," + OSLCConstants.DCTERMS_MODIFIED);
OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 20 '21, 7:38 a.m.