Error in stardog log when running a query

Hi,

A query is failing on me with the following error in stardog.log (sorry for the formatting, stardog is running in an enterprise environment and all I get is a 80x80 char terminal)

ERROR 2018-05-02 14:01:41,286 [XNIO-1 task-16] com.complexible.stardog.protocols
.http.server.StardogHttpServiceLoader:accept(231): An unexpected exception was h
andled by the server
org.openrdf.query.QueryEvaluationException: null
        at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(I
teratorAsTupleQueryResult.java:81) ~[stardog-utils-rdf-5.1.0.jar:?]
        at org.openrdf.query.QueryResults.report(QueryResults.java:158) ~[sesame
-query-4.0.0.jar:?]
        at org.openrdf.query.resultio.QueryResultIO.writeTuple(QueryResultIO.jav
a:449) ~[sesame-queryresultio-api-4.0.0.jar:?]
        at com.complexible.stardog.protocols.http.server.ProtocolUtils.writeTupl
eResponse(ProtocolUtils.java:563) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeRe
adQuery(ProtocolUtils.java:470) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeRe
adQuery(ProtocolUtils.java:455) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQ
uery(SPARQLProtocol.java:134) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at com.complexible.stardog.protocols.http.server.SPARQLProtocol.get(SPAR
QLProtocol.java:82) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$
5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-5.1.0.jar:?]
        at         at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnabl
e.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.1.0.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142) [?:1.8.0_111-internal]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617) [?:1.8.0_111-internal]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: java.lang.ArrayIndexOutOfBoundsException

Are you able to get any more of the stardog.log? It looks like the stack trace continues past what you’ve pasted. Also, how are you running the query?

Hi @stephen

This is the query:

select ((count (distinct ?id)) as ?count ) WHERE { ?id rdf:type ?type }

Run without reasoning.

Are you running it via CLI, HTTP, Java, Studio…?

Java.

20 characters.

I seem unable to reproduce this issue locally. I can see that you’re using 5.1.0 server side. Which version of the client jar(s) are you using?

Same. 5.1.0 there too.

Håvard

I’m away from the office, so I can’t log back in to check for more logs until Monday earliest. High security for the production systems.

Håvard