I am running Stardog 5.2.3 (without reasoning) with the following query:
prefix irishTitle: <http://example.com/earlyIrishTitles.ttl#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
select distinct ?person ?king where {
{
?a a foaf:Person.
bind(count(?a) as ?person)
} union {
?b a irishTitle:Rí.
bind(count(?b) as ?king)
}
}
When I ran this query, I received the following stacktrace in the logs:
ERROR 2018-05-05 13:00:40,085 [stardog-user-10] com.complexible.stardog.protocols.http.server.StardogHttpServiceLoader:accept(229): An unexpected exception was handled by the server
org.openrdf.query.QueryEvaluationException: null
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:81) ~[stardog-utils-rdf-5.2.3.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.writeTupleResponse(ProtocolUtils.java:590) ~[stardog-protocols-http-server-5.2.3.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:497) ~[stardog-protocols-http-server-5.2.3.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:482) ~[stardog-protocols-http-server-5.2.3.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:134) ~[stardog-protocols-http-server-5.2.3.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.get(SPARQLProtocol.java:82) ~[stardog-protocols-http-server-5.2.3.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:196) ~[stardog-protocols-http-server-5.2.3.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:71) ~[stardog-protocols-http-server-5.2.3.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210) ~[guava-18.0.jar:?]
at com.complexible.stardog.dht.dictionary.HashDictionary.getOrAddID(HashDictionary.java:532) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.dht.dictionary.HashDictionary.getID(HashDictionary.java:526) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.index.dictionary.DelegatingMappingDictionary.getID(DelegatingMappingDictionary.java:59) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.index.dictionary.InliningMappingDictionary.getID(InliningMappingDictionary.java:86) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.index.dictionary.DelegatingMappingDictionary.getID(DelegatingMappingDictionary.java:59) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.index.dictionary.QueryMappingDictionary.getID(QueryMappingDictionary.java:86) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.index.dictionary.QueryMappingDictionary.add(QueryMappingDictionary.java:70) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.BindOp.getId(BindOp.java:198) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.BindOp.bind(BindOp.java:170) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:157) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:37) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:82) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:70) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:29) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.LazyUnsortedGroupify$1.computeNext(GroupifyAlgorithms.java:161) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.LazyUnsortedGroupify$1.computeNext(GroupifyAlgorithms.java:152) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:132) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:31) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:53) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:21) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:112) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:110) ~[stardog-5.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:34) ~[stardog-5.2.3.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.2.3.jar:?]
... 14 more
Looks like there is a null pointer exception somewhere. You will need to download my database from github then use the foaf and relationship ontologies (RELATIONSHIP: A vocabulary for describing relationships between people). There are a few ontologies that are in the github repo that you will also need to install as well.