Details

      Description

       
      //Both of the lines below generate an exception as it appears that the /sparql is appended twice.  The  workaround is to create the BigdataSailRemoteRepository directly not using the factory method.
      
       Repository repo = BigdataSailFactory.connect("http://localhost:9999/");
       Repository repo = BigdataSailFactory.connect("localhost",9999);
      
      

      Exception

      org.openrdf.repository.RepositoryException: com.bigdata.rdf.sail.webapp.client.HttpException: Status 
      
      				Code=404, Status Line=Not Found, Response=<html>
      
      
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Error 404 Not Found</title>
      </head>
      <body><h2>HTTP ERROR 404</h2>
      <p>Problem accessing /bigdata/sparql/sparql. Reason:
      <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
      
      </body>
      </html>
      
      

      WORKAROUND:

       BigdataSailRemoteRepository repo = new BigdataSailRemoteRepository("http://localhost:9999/bigdata");
      

      FIX: The issue is in line 141 of the RemoteRepositoryManager, which post-pends /sparql for all cases.

      public RemoteRepositoryManager(final String serviceURL,
                  final boolean useLBS, final HttpClient httpClient,
                  final Executor executor) {
      
              super(serviceURL + "/sparql", useLBS, httpClient, executor);
      
              this.baseServiceURL = serviceURL;
      
          }
      

        Activity

        Hide
        bradbebee bradbebee added a comment -
        Show
        bradbebee bradbebee added a comment - Branch TICKET_1139 in CI: https://github.com/SYSTAP/bigdata/pull/31
        Hide
        bryanthompson bryanthompson added a comment -

        Brad and I discussed this change set. The change violates the documented behavior of the RemoteRepositoryManager (it accepts the URL of the web application context) and the RemoteRepository (it accepts a SPARQL end point URL).

        The correct change is to the BigdataSailFactory. As Brad points out, this code can not succeed as written since it always results in an extra "/sparql" in the effective URL. Further, it is not tested from within the BG code base.

        Brad will close out this pull request, write tests for CI against the BigdataSailFactory, and fix the user-friendly rewrites of the URL for BigdataSailFactory.connect().

        Show
        bryanthompson bryanthompson added a comment - Brad and I discussed this change set. The change violates the documented behavior of the RemoteRepositoryManager (it accepts the URL of the web application context) and the RemoteRepository (it accepts a SPARQL end point URL). The correct change is to the BigdataSailFactory. As Brad points out, this code can not succeed as written since it always results in an extra "/sparql" in the effective URL. Further, it is not tested from within the BG code base. Brad will close out this pull request, write tests for CI against the BigdataSailFactory, and fix the user-friendly rewrites of the URL for BigdataSailFactory.connect().
        Hide
        bradbebee bradbebee added a comment -
        Show
        bradbebee bradbebee added a comment - Updated in PR: https://github.com/SYSTAP/bigdata/pull/33
        Hide
        bradbebee bradbebee added a comment -

        Merged into master.

        Show
        bradbebee bradbebee added a comment - Merged into master.

          People

          • Assignee:
            beebs Brad Bebee
            Reporter:
            beebs Brad Bebee
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: