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

RRC v4.0.5 and oslc query

 Hi,

I've been through the OSLC workshop (https://jazz.net/library/article/635) on RRC v4.0.1 and devloped a java application to extract requirements without any problem.

I've just upgraded one of our test servers to RRC v4.0.5 and neither my application nor the workshop are working.

In the workshop, there's a sample query to retrieve all the requirements for a given project.
My project code is "PRJ_CODE" and let's assume my server name is MYSERVER.

Then, the URL provided in the workshop is:
https://MYSERVER/rm/views?oslc.query=true&projectURL=https%3A%2F%2FMYSERVER%2Fjts%2Fprocess%2Fproject-areas%2FPRJ_CODE&oslc.prefix=rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns%23>,dcterms=<http://purl.org/dc/terms/>&oslc.select=*&oslc.where=rdf:type=<http://openservices.net/ns/rm%23Requirement>

This query was working properly on v4.0.1 but not anymore on v4.0.5.
In my request headers, I have the following options:
Accept:application/xml
OSLC-Core-Version:2.0

Response is an error 500.
See images for header/body reponse.
error response header


error response body

And here's the server error log (I've truncated part of the message. If complete sequence call is needed, let me know!):
Error: Entry [ca2df761e87bee6d]
java.lang.RuntimeException: Error when converting:
oslc.query=true&
oslc.prefix=rdf&
oslc.select=*&
oslc.where=rdf:type=<http://openservices.net/ns/rm#Requirement>
com.ibm.oslc.query.parser.select.ParseException: Invalid prefix definition: rdf
at com.ibm.rdm.oslc.query.rql.OslcQueryToRql.convert(OslcQueryToRql.java:112)
at com.ibm.rdm.oslc.query.rql.OslcQueryToRql.<init>(OslcQueryToRql.java:49)
at com.ibm.rdm.fronting.server.rrs.views.OslcViewExecutionRequest.createViewFromOslcQuery(OslcViewExecutionRequest.java:133)
.....
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: com.ibm.oslc.query.parser.select.ParseException: Invalid prefix definition: rdf
at com.ibm.oslc.query.parser.prefix.OslcPrefixParser.parsePrefixDefinition(OslcPrefixParser.java:36)
at com.ibm.oslc.query.parser.prefix.OslcPrefixParser.parse(OslcPrefixParser.java:26)
at com.ibm.oslc.query.parser.CustomOslcParser.select(CustomOslcParser.java:31)
at com.ibm.rdm.oslc.query.rql.OslcQueryToRql.invokePrefixParser(OslcQueryToRql.java:119)
at com.ibm.rdm.oslc.query.rql.OslcQueryToRql.convert(OslcQueryToRql.java:73)
... 59 more

How can I fix this problem?

Thank you.
Nico

1 vote


Accepted answer

Permanent link
Hi,
Pls try using an oslc.prefix entry for each namespace definition like :
&olsc.prefix=<dcterms....>&oslc.prefix=<other prefix.....>
   
nicolas teulier selected this answer as the correct answer

2 votes


3 other answers

Permanent link
It's working now! thank you.
Now let's try to fix the other queries returning errors!

1 vote


Permanent link

I tried using and oslc.prefix for each ns definition 


This ignored the DCterms and selected all the uses (~over 6K rows)!!!!


0 votes


Permanent link
@Venkatesh Nadamuni :  I had the same problem, it was caused by forgotting to escape "#" to '%23', it causes the remaining of the request being ignored.

Some hints from my experience with DOORS NG 6.0.5:

0 votes

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,950
× 516
× 139

Question asked: Feb 23 '14, 9:33 p.m.

Question was seen: 7,254 times

Last updated: Jan 29 '19, 12:00 p.m.

Confirmation Cancel Confirm