Page MenuHomePhabricator

SPARQL "service" clause seems not to work
Closed, DeclinedPublic

Description

A encoded query is sent via curl GET request to https://query.wikidata.org/bigdata/namespace/wdq/sparql

The resulting error message is given below. (The endpoint referenced in the service clause is Jena Fuseki 2. I've tested an analogous query against http://zbw.eu/beta/sparql/gnd/query, where it executes correctly.)

SPARQL-QUERY: queryStr=PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>

construct {
  ?gnd schema:about ?sitelink .
}
where {
  service <http://zbw.eu/beta/sparql/econ_pers/query> {
    ?gnd skos:prefLabel [] ;
         skos:exactMatch ?wd .
    filter(contains(str(?wd), 'wikidata'))
  }
  ?sitelink schema:about ?wd ;
            schema:inLanguage ?language .
  filter (contains(str(?sitelink), 'wikipedia'))
  filter (lang(?wdLabel) = ?language && ?language in ('en', 'de'))
}


java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        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.doGet(QueryServlet.java:278)
        at com.bigdata.rdf.sail.webapp.RESTServlet.doGet(RESTServlet.java:219)
        at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doGet(MultiTenancyServlet.java:214)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
        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:1127)
        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:1061)
        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:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:834)
        at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
        at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        ... 1 more
Caused by: java.lang.NullPointerException
        at com.bigdata.rdf.sparql.ast.optimizers.TypeBasedASTJoinGroupPartitionReorderer.reorderNodes(TypeBasedASTJoinGroupPartitionReorderer.java:84)
        at com.bigdata.rdf.sparql.ast.optimizers.ASTJoinGroupOrderOptimizer.optimizeWithinPartition(ASTJoinGroupOrderOptimizer.java:455)
        at com.bigdata.rdf.sparql.ast.optimizers.ASTJoinGroupOrderOptimizer.optimizeWithinPartitions(ASTJoinGroupOrderOptimizer.java:333)
        at com.bigdata.rdf.sparql.ast.optimizers.ASTJoinGroupOrderOptimizer.optimizeJoinGroup(ASTJoinGroupOrderOptimizer.java:144)
        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:262)
        at com.bigdata.rdf.sparql.ast.eval.ASTEvalHelper.evaluateGraphQuery(ASTEvalHelper.java:525)
        at com.bigdata.rdf.sail.BigdataSailGraphQuery.evaluate(BigdataSailGraphQuery.java:115)
        at com.bigdata.rdf.sail.BigdataSailGraphQuery.evaluate(BigdataSailGraphQuery.java:97)
        at org.openrdf.repository.sail.SailGraphQuery.evaluate(SailGraphQuery.java:113)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$GraphQueryTask.doQuery(BigdataRDFContext.java:1774)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.innerCall(BigdataRDFContext.java:1567)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1532)
        at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:704)
        ... 4 more

Related Objects

Event Timeline

Jneubert raised the priority of this task from to Needs Triage.
Jneubert updated the task description. (Show Details)
Jneubert added a project: Wikidata.
Jneubert subscribed.
Smalyshev closed this task as Declined.EditedFeb 16 2016, 8:05 PM
Smalyshev claimed this task.
Smalyshev subscribed.

Unfortunately, we do not allow external federated queries in Wikidata Query Service for security reasons (it's basically open proxy).

The error message could use some improvement though. We have T112723 for this, and it looks like it will be fixed in Blazegraph 2.0 soon.