Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1084

sparql endpoint URI in service description is incorrect

    Details

    • Type: Bug
    • Status: Accepted
    • Resolution: Unresolved
    • Affects Version/s: BIGDATA_RELEASE_1_3_2
    • Fix Version/s: None
    • Component/s: NanoSparqlServer
    • Labels:
      None

      Description

      <rdf:Description rdf:nodeID="defaultDataset">
      	<rdf:type rdf:resource="http://www.w3.org/ns/sparql-service-description#Dataset"/>
      	<rdf:type rdf:resource="http://rdfs.org/ns/void#Dataset"/>
      	<title xmlns="http://purl.org/dc/terms/">kb</title>
      	<Namespace xmlns="http://www.bigdata.com/rdf#/features/KB/">kb</Namespace>
      	<sparqlEndpoint xmlns="http://rdfs.org/ns/void#" rdf:resource="http://localhost:8080/bigdata/namespace/kb/sparql/kb/sparql"/>
      	<sparqlEndpoint xmlns="http://rdfs.org/ns/void#" rdf:resource="http://localhost:8080/bigdata/LBS/namespace/kb/sparql/kb/sparql"/>
      	<uriRegexPattern xmlns="http://rdfs.org/ns/void#">^.*</uriRegexPattern>
      	<defaultGraph xmlns="http://www.w3.org/ns/sparql-service-description#" rdf:nodeID="defaultGraph"/>
      </rdf:Description>
      

      But the correct URL should be:

      	<sparqlEndpoint xmlns="http://rdfs.org/ns/void#" rdf:resource="http://localhost:8080/bigdata/namespace/kb/sparql/kb/sparql"/>
      

      Also the generated endpoints are based on the requestURL. This means that they will include the "/namespace" URI component when produced by a SERVICE DESCRIPTION request. We need to look at the invocation contexts and ensure that the resulting URI is a SPARQL end point in all cases (ending in /sparql not /namespace).

      Finally, the /LBS/ endpoints are incorrect. They need to be rewritten to use /LBS/leader/ and /LBS/read/. Those URI path components will correctly locate the leader-based LBS redirect and the load balanced read-only based LBS re-direct.

      A related issue as noted on the list: Are you aware that the service description of a namespace gives this sparql endpoint:

      <Namespace>kb</Namespace>
      <sparqlEndpoint rdf:resource="http://localhost:8080/bigdata/namespace/kb/sparql/kb/sparql"/>
      

      instead of

      <Namespace>kb</Namespace>
      <sparqlEndpoint rdf:resource="http://localhost:8080/bigdata/namespace/kb/sparql"/>
      

        Activity

        beebs Brad Bebee created issue -
        Hide
        bryanthompson bryanthompson added a comment -

        The problem is with the SPARQL endpoint URI as self-reported for the default data set. It is correct for the top-level service description for each KB.

        The fix is to Void.java ~ line 193:
        Old:

                for (String uri : serviceURI) {
                    g.add(aDataset,
                            VoidVocabularyDecl.sparqlEndpoint,
                            f.createURI(uri + "/" + ConnectOptions.urlEncode(namespace)
                                    + "/sparql"));
                }
        

        New:

                for (String uri : serviceURI) {
                    g.add(aDataset,
                            VoidVocabularyDecl.sparqlEndpoint,
                            f.createURI(uri));
                }
        
        Show
        bryanthompson bryanthompson added a comment - The problem is with the SPARQL endpoint URI as self-reported for the default data set. It is correct for the top-level service description for each KB. The fix is to Void.java ~ line 193: Old: for (String uri : serviceURI) { g.add(aDataset, VoidVocabularyDecl.sparqlEndpoint, f.createURI(uri + "/" + ConnectOptions.urlEncode(namespace) + "/sparql")); } New: for (String uri : serviceURI) { g.add(aDataset, VoidVocabularyDecl.sparqlEndpoint, f.createURI(uri)); }
        beebs Brad Bebee made changes -
        Field Original Value New Value
        Workflow Trac Import v2 [ 12920 ] Trac Import v3 [ 13399 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v3 [ 13399 ] Trac Import v4 [ 14728 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v4 [ 14728 ] Trac Import v5 [ 16118 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v5 [ 16118 ] Trac Import v6 [ 18437 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v6 [ 18437 ] Trac Import v7 [ 19856 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v7 [ 19856 ] Trac Import v8 [ 21545 ]

          People

          • Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            bryanthompson bryanthompson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: