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

[closed] Error: For input string: "http://jazz.net/ns/rm#Module"

Hi All,

I am using 702 SR1 iFix017.

I am using oslc query to get all the modules in the component.

Here is my Query URL:


output:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/">
  <rdf:Description>
    <err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">For input string: "http://jazz.net/ns/rm#Module"</err:detailedMessage>
    <err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Bad Request</err:errorMessage>
    <err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long">400</err:errorStatus>
  </rdf:Description>
</rdf:RDF>

This query giving 400: Bad request. The same query was working earlier in 606 version.

Please let me know if am doing something wrong in the query.

Thanks in advance.
Manju

0 votes

Comments
Please include headers in your post, what authentication method are you using? 

I am using Basic authentication and below are the headers. OSLC-Core-Version:2.0 Accept:application/rdf+xml

Not all the request parameters are correctly URL encoded. For example, for the oslc.where parameter, your usage shows a value in which < is not URL encoded but should be. The same error is evident in  many other parameters. Parameter values must be URL encoded - your request URL is not valid.

Thanks for your suggestion. I have posted here the decoded URL for better understanding. Below is the actual URL, which i am using. https://localhost:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Falm.harman.com%2Frm3%2Fprocess%2Fproject-areas%2F_A54qEA3eEeuovOjzm6sXuD&oslc_config.context=https://localhost:9443/rm/cm/stream/_4pVPQA3eEeuovOjzm6sXuA&oslc.paging=true&oslc.pageSize=100&oslc.where=rdm_types%3AArtifactFormat%3D%3Chttp%3A%2F%2Fjazz.net%2Fns%2Frm%23Module%3E&oslc.select=*&oslc.prefix=rdm_types%3D%3Chttp%3A%2F%2Fwww.ibm.com%2Fxmlns%2Frdm%2Ftypes%2F%3E It is not only in my environment, it is not working even with 702 SR1 iFix021 sandbox

After multiple checks, the Query URL works find in 7.0.2 SR1 iFix015. Same URL not working for iFix017 and iFix021. Any reason for this ?

Consider opening a case with support. 

Note that just the URI is useless. The Method, the additional headers sent e.g. content type would be essential, also "Does not work"  is a quite useless statement. What does that mean?

showing 5 of 7 show 2 more comments

The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Apr 19 '23, 3:58 a.m.

Accepted answer

Permanent link

I don't know why this changed in iFix017 but rdm_types:ArtifactFormat is no longer exposed as a property for OSLC Query although it used to work before 017. Instead the rdf:type property can be tested - AFAICT this also works for 7.0.2 ifixes prior to 017.


So your query:


has to be changed to:

  • oslc.where=rdf:type=jazz_rm:Module

and prefix jazz_rm is http://jazz.net/ns/rm#

This could also be expressed without a prefix on the RHS as:

Manju Gowda selected this answer as the correct answer

1 vote

Comments
Thanks a lot Barnard :) This works well. i am able to fetch all modules in the component.

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
× 11,109

Question asked: Apr 17 '23, 11:08 a.m.

Question was seen: 2,583 times

Last updated: Apr 19 '23, 3:58 a.m.

Confirmation Cancel Confirm