Using WikiData Endpoint

I'm trying to run a query that includes Wikidata as Service but I can't seem to get it to work:
A similar query using dbpedia is working fine.

This is what I have tested:
SELECT * WHERE
{
Service https://query.wikidata.org/sparql {

	<http://www.wikidata.org/entity/Q27745002> <http://www.wikidata.org/prop/direct/P31> ?item

}

}

See stacktrace error at the bottom of this message...
When I run the query: SELECT * WHERE { ... } directly against https://query.wikidata.org/sparql?query=... I get a normal sparql result set:

<?xml version='1.0' encoding='UTF-8'?>

http://www.wikidata.org/entity/Q146

Please help to see what I'm missing.
Kr,

Tim

Stacktrace from log file:

ERROR 2018-01-23 09:48:25,880 [XNIO-1 task-16] com.complexible.stardog.protocols.http.server.StardogHttpServiceLoader:accept(226): An unexpected exception was handled by the server
org.openrdf.query.QueryEvaluationException: There is no service which can handle the URI: https://query.wikidata.org/sparql
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:81) ~[stardog-utils-rdf-5.0.2.jar:?]
at org.openrdf.query.QueryResults.report(QueryResults.java:158) ~[sesame-query-4.0.0.jar:?]
at org.openrdf.query.resultio.QueryResultIO.writeTuple(QueryResultIO.java:449) ~[sesame-queryresultio-api-4.0.0.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:475) ~[stardog-protocols-http-server-5.0.2.jar:?]
at com.complexible.stardog.protocols.http.annex.QueryPanelService.executeQuery(QueryPanelService.java:180) ~[stardog-webconsole-annex-5.0.2.jar:?]
at com.complexible.stardog.protocols.http.annex.QueryPanelService.post(QueryPanelService.java:120) ~[stardog-webconsole-annex-5.0.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:186) ~[stardog-protocols-http-server-5.0.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) ~[shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) ~[shiro-core-1.2.3.jar:1.2.3]
at com.stardog.http.server.undertow.ErrorHandling.lambda$safeDispatch$1(ErrorHandling.java:70) ~[stardog-protocols-http-server-5.0.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: com.complexible.stardog.plan.eval.operator.OperatorException: There is no service which can handle the URI: https://query.wikidata.org/sparql
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:109) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:35) ~[stardog-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:83) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:33) ~[stardog-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SliceOp._hasNext(SliceOp.java:87) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:95) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:26) ~[stardog-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:112) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:110) ~[stardog-5.0.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:34) ~[stardog-5.0.2.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:?]
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:77) ~[stardog-utils-rdf-5.0.2.jar:?]
... 12 more

I'm going to guess, and this is only a guess, that Stardog isn't supporting https for federated queries. If that's the case you may be able to use stunnel to terminate the https connection on the localhost and access it as a non-ssl site from there. Let me know if you're interested in trying that out and I can help you with that.

Thanks for the reply.
I think you might be right about the https part. We have succesfully used other non-https services.

Thanks for offering your help and I might come back to you about it, for now I hope Stardog will quickly implement support for https endpoints also (if that indeed is the issue).
Hopefully someone from Stardog can comment to confirm

Hi,

This was indeed the issue, but it was fixed in version 5.0.4

Great, thanks Stephen. I’ll download the new version and let you know if it works

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.