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

Exception : The reference to entity "etag" must end with the ';' delimiter.

My code looks like below

Please provide me solution

HttpGet query = new HttpGet(catalogURI);
        query.addHeader("Accept", "application/xml");
        query.addHeader("OSLC-Core-Version", "2.0");

        // Access to the Service Providers catalog
        HttpResponse response = HttpUtils.sendGetForSecureDocument(server,
                query, login, password, httpclient, JTS_Server);
        if (response.getStatusLine().getStatusCode() != 200) {
            response.getEntity().consumeContent();
            throw new HttpResponseException(response.getStatusLine()
                    .getStatusCode(), response.getStatusLine()
                    .getReasonPhrase());
        }
        // Define the XPath evaluation environment
        XPath xpath = getXpathNamespace();
        String serviceProviderXPath = "//oslc:ServiceProvider[dcterms:title=\""
                + paName + "\"]/@rdf:about";
        

        // Retrieve the designated Service Provider
        InputSource source = new InputSource(response.getEntity().getContent());
        Node paNode = (Node) (xpath.evaluate(serviceProviderXPath, source,XPathConstants.NODE));

OSLC Output in Rest (FireFox)
<oslc:serviceProvider>
<oslc:ServiceProvider rdf:about="https://korvm066.apac.bosch.com:9443/rm/oslc_rm/_o_4IMkGiEeWZVf7TKpPoBQ/services.xml">
<dcterms:title rdf:parseType="Literal">IBM DEMO</dcterms:title>
<jp:consumerRegistry rdf:resource="https://korvm066.apac.bosch.com:9443/rm/process/project-areas/_o_4IMkGiEeWZVf7TKpPoBQ/links"/>
<oslc:details rdf:resource="https://korvm066.apac.bosch.com:9443/rm/process/project-areas/_o_4IMkGiEeWZVf7TKpPoBQ"/>
</oslc:ServiceProvider>
</oslc:serviceProvider>

Exception:
Fatal Error] :17:78: The reference to entity "etag" must end with the ';' delimiter.
org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
    at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
    at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    ... 4 more

0 votes



One answer

Permanent link
You should have the source code and debug to find out the cause.
com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)

0 votes

Comments

Hello Donald,

I have provide you the source code as well in my question. tell me what is the meaning of that exception.

What is line 180 in your code?

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
× 7,495
× 1,220

Question asked: Sep 15 '15, 4:48 a.m.

Question was seen: 6,053 times

Last updated: Sep 16 '15, 1:08 a.m.

Confirmation Cancel Confirm