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

Whitelisted service get rejected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: BLAZEGRAPH_RELEASE_1_5_3
    • Fix Version/s: BLAZEGRAPH_2_0_0
    • Component/s: NanoSparqlServer
    • Labels:
      None

      Description

      1. Add param to web.xml:
        <context-param>
        <description>Services whitelist</description>
        <param-name>serviceWhitelist</param-name>
        <param-value>http://sparql.org/books</param-value>
        </context-param>
      2. Start NanoSparqlServer.
      3. Execute SPARQL:
        PREFIX : <http://example/>
        PREFIX dc: <http://purl.org/dc/elements/1.1/>
        SELECT ?a
        {
        ?b dc:title ?title .
        SERVICE <http://sparql.org/books> { ?s dc:title ?title . ?s dc:creator ?a }

        }

      4. Get response:
        java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Service URI http://sparql.org/books is not allowed
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
        at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
        at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
        at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:248)
        at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:140)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Service URI http://sparql.org/books is not allowed
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:834)
        at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:1)
        at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        ... 1 more
        Caused by: java.lang.IllegalArgumentException: Service URI http://sparql.org/books is not allowed
        at com.bigdata.rdf.sparql.ast.service.ServiceRegistry.getServiceFactoryByServiceURI(ServiceRegistry.java:493)
        at com.bigdata.rdf.sparql.ast.service.ServiceNode.getResponsibleServiceFactory(ServiceNode.java:443)
        at com.bigdata.rdf.sparql.ast.service.ServiceNode.getRequiredBound(ServiceNode.java:408)
        at com.bigdata.rdf.sparql.ast.GroupNodeVarBindingInfo.(GroupNodeVarBindingInfo.java:85)
        at com.bigdata.rdf.sparql.ast.GroupNodeVarBindingInfoMap.(GroupNodeVarBindingInfoMap.java:63)
        at com.bigdata.rdf.sparql.ast.optimizers.ASTJoinGroupOrderOptimizer.optimizeJoinGroup(ASTJoinGroupOrderOptimizer.java:105)
        at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:161)
        at com.bigdata.rdf.sparql.ast.optimizers.AbstractJoinGroupOptimizer.optimize(AbstractJoinGroupOptimizer.java:101)
        at com.bigdata.rdf.sparql.ast.optimizers.ASTOptimizerList.optimize(ASTOptimizerList.java:117)
        at com.bigdata.rdf.sparql.ast.eval.AST2BOpUtility.convert(AST2BOpUtility.java:264)
        at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.evaluateTupleQuery(ASTEvalHelper.java:235)
        at com.bigdata.rdf.sail.BigdataSailTupleQuery.evaluate(BigdataSailTupleQuery.java:93)
        at com.bigdata.rdf.sail.BigdataSailTupleQuery.evaluate(BigdataSailTupleQuery.java:75)
        at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:75)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$TupleQueryTask.doQuery(BigdataRDFContext.java:1711)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.innerCall(BigdataRDFContext.java:1568)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1533)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1)
        ... 4 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              maria.krokhaleva maria.krokhaleva
              Reporter:
              maria.krokhaleva maria.krokhaleva
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: