It's all about the answers!

Ask a question

Getting Context Root Not Found when using REST API


Roy Coons (1111) | asked Feb 07 '18, 3:01 p.m.

 Hello,

I am trying to import test result information into RQM via the Excel REST tool and here is a sample from the config file that fails because it cannot find the Custom_attribute_0
executionresult.customAttributes identifier="Custom_attribute_0".name=" TestDuration".type="SMALL_STRING".value=I

So I tried to get the XML file using the RESTClient add-on for Mozilla however this is failing with Context Root Not Found

I am logged into RQM in Mozilla and have the cookie in the X-Jazz-CSRF-Prevent request header (see below)

Sending a GET request

This is the response
  1. Status Code: 404 Not Found
  2. Connection: Close
  3. Content-Length: 29092
  4. Content-Type: text/html; charset=UTF-8
  5. Date: Wed, 07 Feb 2018 19:45:12 GMT
curl -X GET -H 'OSLC-Core-version: 2.0' -H 'Accept: application/xml' -H 'Content-Type: application/rdf+xml' -H 'X-Jazz-CSRF-Prevent: 0000SRnORr_COaeIq84nglhHpY2:6885b8fc-7638-468e-9419-17b50be054fa' -H 'Authorization: Basic cmNvb25zOklhbUF1dDB0cjBu' -i 'http://jazz.sonosite.com:9080/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/SandboxTheresa2M2/testcase/urn:com.ibm.rqm:testcase:152'

Failure line from response
<meta name="DC.Title" content="WebSphere Application Server Version V8.5 Liberty Profile - Context Root Not Found" />

The URL to the test case within RQM is 

Can I please get some insight as to what is wrong?

One answer



permanent link
Kevin Ramer (4.5k9186201) | answered Feb 07 '18, 4:40 p.m.

The obvious thing I see is that your latter URL contains no port# implying the default port of 80, while the 2nd contains  port 9080.  That indicates that there may be an HTTP server routing requests to a J2EE ( e.g. tomcat/liberty )

Use curl or wget on the application-about with/without the port.  This requires no special headers or authentication.  Go with the one that works.

wget http://your-host.somewhere.com:9080/qm/application-about

wget http://your-host.somewhere.com/qm/application-about

Your result will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:jfs="http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
         xmlns:oslc="http://open-services.net/ns/core#"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dcterms="http://purl.org/dc/terms/">
    <oslc:Publisher  rdf:about="https://rtp-rtc9:9443/jazz/application-about">
        <dcterms:title>Change and Configuration Management</dcterms:title>
        <jfs:nonLocalizedTitle>Change and Configuration Management</jfs:nonLocalizedTitle>
        <dcterms:description>Provides capabilities for change management, planning, software configuration management, automation (build system), and extensions for IBM enterprise platforms development.</dcterms:description>
        <dcterms:identifier>http://jazz.net/application/ccm</dcterms:identifier>
        <jfs:version>6.0.2</jfs:version>
        <oslc:icon rdf:resource="https://rtp-rtc9:9443/jazz/web/com.ibm.team.rtc.web/ui/graphics/UICustomizations/RTC_16.png"/>
        <jfs:instanceName>CLM TDS Build</jfs:instanceName>
    </oslc:Publisher >
</rdf:RDF>



Your answer


Register or 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.