Is there a solution to oslc.prefix with multiple entries causes a HTTP/1.1 500 Internal Server Error on a RM5.0 server?
I found an issue what I think to be an issue with multiple items in a oslc.prefix. The issue was found an a larger code base, but to demonstrate the issue on a smaller testcase, I used some example code from the IBM Rational CLM 2012 OSLC Workshop: I modified Example05 to add an additional term in the oslc.prefix (types). The code passes on a RM4.0 server, but fails on a RM5.0 server. String oslcSearchByIdentifierQuery = queryCapabilityURI +
java.lang.Exception: Error occured while posting HTTP/1.1 500 Internal Server Error at net.jazz.oslc.utils.HttpUtils.sendPostForSecureDocument(HttpUtils.java:311) at net.jazz.oslc.consumer.examples.e05.performQuery(e05.java:110) at net.jazz.oslc.consumer.examples.e05.run(e05.java:56) at net.jazz.oslc.consumer.examples.e05.main(e05.java:176)
|
Accepted answer
Hi,
Could you try following options ? 1) Add multiple oslc.properties entries, one for each value 2) URL encode the "," char that separates the entries. Best Regards. Jeff Freeman selected this answer as the correct answer
Comments
Jeff Freeman
commented Nov 19 '15, 2:58 p.m.
One thing I did not mention is that I post the exact same URL to both servers with the REST API client and I did not receive any HTTP error from the REST client. This seems to me that the apache http client version may need to be updated?
Jeff Freeman
commented Nov 19 '15, 8:19 p.m.
I tried #2 and there was no difference.
I found the answer in the forum:
Gabriel, you are correct with #1.
|
One other answer
I specified the following for my query. It ignores the dcterms and returns over 6000 rows. I am using DNG 6.03 and running HTTP-GET on POSTMAN
oslc.prefix=dcterms=<http://purl.org/dc/terms/>&
oslc.prefix=oslc_rm=<http://open-services.net/ns/rm#>&
oslc.select=oslc_rm:uses&
oslc.where=dcterms:identifier=81972
|
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.
Comments
Here is the code fragment:
String oslcSearchByIdentifierQuery =
queryCapabilityURI +
"&oslc.prefix=" +
URLEncoder.encode("dcterms=<http://purl.org/dc/terms/>", "UTF8") + "," +
URLEncoder.encode("types=<http://www.ibm.com/xmlns/rdm/types/>", "UTF8") +
"&oslc.select=" +
URLEncoder.encode("dcterms:title", "UTF8") +
"&oslc.where=" + URLEncoder.encode("dcterms:identifier=" + identifier, "UTF8");