Construct queries cause unexpected EOF exception

Hi,

My construct queries against stardog have suddenly started to error out.

From the client:

es-client_1               | java.lang.RuntimeException: org.openrdf.query.QueryEvaluationException: org.openrdf.rio.RDFParseException: Unexpected end of file
es-client_1               | 	at no.difi.einnsyn.ReceiveHandler.onMessage(ReceiveHandler.java:76)
es-client_1               | 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:746)
es-client_1               | 	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:684)
es-client_1               | 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
es-client_1               | 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:315)
es-client_1               | 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:253)
es-client_1               | 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1164)
es-client_1               | 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1156)
es-client_1               | 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1053)
es-client_1               | 	at java.lang.Thread.run(Thread.java:745)
es-client_1               | Caused by: org.openrdf.query.QueryEvaluationException: org.openrdf.rio.RDFParseException: Unexpected end of file
es-client_1               | 	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94)
es-client_1               | 	at com.complexible.common.openrdf.query.DelegatingGraphQueryResult.hasNext(DelegatingGraphQueryResult.java:75)
es-client_1               | 	at com.complexible.stardog.api.impl.SPECGraphQuery$SNARLConnectionGraphQueryResult.hasNext(SPECGraphQuery.java:239)
es-client_1               | 	at info.aduna.iteration.IterationSpliterator.forEachRemaining(IterationSpliterator.java:65)
es-client_1               | 	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
es-client_1               | 	at no.difi.einnsyn.MainHandler.lambda$getDataFromStardog$5(MainHandler.java:201)
es-client_1               | 	at no.difi.einnsyn.stardog.AbstractStardogDatabase.connectionReturn(AbstractStardogDatabase.java:91)
es-client_1               | 	at no.difi.einnsyn.MainHandler.getDataFromStardog(MainHandler.java:174)
es-client_1               | 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
es-client_1               | 	at java.util.Iterator.forEachRemaining(Iterator.java:116)
es-client_1               | 	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
es-client_1               | 	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
es-client_1               | 	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
es-client_1               | 	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1620)
es-client_1               | 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
es-client_1               | 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
es-client_1               | 	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
es-client_1               | 	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
es-client_1               | 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
es-client_1               | 	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
es-client_1               | 	at no.difi.einnsyn.MainHandler.handle(MainHandler.java:123)
es-client_1               | 	at no.difi.einnsyn.ReceiveHandler.onMessage(ReceiveHandler.java:51)
es-client_1               | 	... 9 common frames omitted
es-client_1               | Caused by: org.openrdf.rio.RDFParseException: Unexpected end of file
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.throwEOFException(TurtleParser.java:1422)
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.parseValue(TurtleParser.java:658)
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.parseObject(TurtleParser.java:527)
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.parseObjectList(TurtleParser.java:453)
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.parsePredicateObjectList(TurtleParser.java:446)
es-client_1               | 	at org.openrdf.rio.trig.TriGParser.parseTriples(TriGParser.java:260)
es-client_1               | 	at org.openrdf.rio.trig.TriGParser.parseGraph(TriGParser.java:197)
es-client_1               | 	at org.openrdf.rio.trig.TriGParser.parseStatement(TriGParser.java:128)
es-client_1               | 	at org.openrdf.rio.turtle.TurtleParser.parse(TurtleParser.java:214)
es-client_1               | 	at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:230)
es-client_1               | 	at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:197)
es-client_1               | 	at com.complexible.common.rdf.rio.RDFStreamProcessor$ProducerThread.work(RDFStreamProcessor.java:773)
es-client_1               | 	at com.complexible.common.rdf.rio.RDFStreamProcessor$Worker.call(RDFStreamProcessor.java:737)
es-client_1               | 	at com.complexible.common.rdf.rio.RDFStreamProcessor$Worker.call(RDFStreamProcessor.java:726)
es-client_1               | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
es-client_1               | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
es-client_1               | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
es-client_1               | 	... 1 common frames omitted

stardog.log:

ERROR 2017-03-16 15:24:00,859 [StardogServer.WorkerGroup-14] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(161): There was an error while encoding the response
com.complexible.common.protocols.EncodingException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:426) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder$SingletonMessageResponseBodyEncoder.encode(HttpMessageEncoder.java:518) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	... 11 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
ERROR 2017-03-16 15:24:00,860 [StardogServer.WorkerGroup-14] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(171): There was an error writing the HTTP response
org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder$SingletonMessageResponseBodyEncoder.encode(HttpMessageEncoder.java:518) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: java.lang.ArrayIndexOutOfBoundsException

Tried to repair:

bash-4.3# ./stardog-admin db repair testSesame
testSesame is not corrupted, there is nothing to repair.

Can we get a minimal data set and query that reproduces this? Fake data is fine, as long as it produces this error.

I’ll try to reproduce it locally. At the moment it’s happening on the development server with 30 million triples.

It’s going to take a while I think.

Can we at least get an example of the query you’re running?

CONSTRUCT {
 ?id a <http://www.arkivverket.no/standarder/noark5/arkivstruktur/Journalpost> ;
    arkiv:offentligTittel ?offentligTittel;
    arkiv:offentligTittel_SENSITIV ?offentligTittel_SENSITIV;
    arkiv:parent ?parent.
    ?id arkiv:dokumentbeskrivelse ?dokumentbeskrivelse.
    ?dokumentbeskrivelse a arkiv:Dokumentbeskrivelse;
        arkiv:tittel ?dok_tittel;
        arkiv:tittel_SENSITIV ?dok_tittel_SENSITIV.

    ?dokumentbeskrivelse arkiv:dokumentobjekt ?dokobjekt.
    ?dokobjekt a arkiv:Dokumentobjekt.
    ?dokobjekt arkiv:referanseDokumentfil ?referanseDokumentfil.
     ?id arkiv:korrespondansepart ?korrespondansepart.
 
        ?korrespondansepart a arkiv:Korrespondansepart.
 
        ?korrespondansepart arkiv:korrespondansepartNavn ?korrespondansepartNavn.
        ?korrespondansepart arkiv:korrespondansepartNavn_SENSITIV ?korrespondansepartNavn_SENSITIV.
        ?korrespondansepart arkiv:korrespondanseparttype ?korrespondanseparttype.
 ?id arkiv:arkivertDato ?arkivertDato.
 ?id arkiv:forfatter ?forfatter.
 ?id arkiv:journalpostnummer ?journalpostnummer.
 ?id arkiv:journalstatus ?journalstatus.
 ?korrespondansepart arkiv:postadresse ?korrespondansepart_postadresse.
 ?id arkiv:noekkelord ?noekkelord.
 ?id arkiv:opprettetAv ?opprettetAv.
 ?id arkiv:opprettetDato ?opprettetDato.
 ?id arkiv:publisertDato ?publisertDato.
 ?id arkiv:journaldato ?journaldato.
     ?id arkiv:arkivskaper ?arkivskaper.
 
     ?id  arkiv:arkivskaperTransitive  ?arkivskaperTransitive.
 
 } WHERE {
 
 {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
 
 
 ?id a <http://www.arkivverket.no/standarder/noark5/arkivstruktur/Journalpost> ;
    arkiv:offentligTittel ?offentligTittel;
    arkiv:offentligTittel_SENSITIV ?offentligTittel_SENSITIV;
    arkiv:parent ?parent.
 OPTIONAL{?id arkiv:arkivertDato ?arkivertDato.}
 OPTIONAL{?id arkiv:forfatter ?forfatter.}
 OPTIONAL{?id arkiv:journalpostnummer ?journalpostnummer.}
 OPTIONAL{?id arkiv:journalstatus ?journalstatus.}
 OPTIONAL{?id arkiv:noekkelord ?noekkelord.}
 
 OPTIONAL{?id arkiv:opprettetAv ?opprettetAv.}
 OPTIONAL{?id arkiv:opprettetDato ?opprettetDato.}
 OPTIONAL{?id arkiv:publisertDato ?publisertDato.}
 OPTIONAL{?id arkiv:journaldato ?journaldato.}
 
 
 
 
 
 } union {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
 
     ?id arkiv:dokumentbeskrivelse ?dokumentbeskrivelse.
     ?dokumentbeskrivelse arkiv:tittel ?dok_tittel;
         arkiv:tittel_SENSITIV ?dok_tittel_SENSITIV.
 } union {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
 
     ?id arkiv:dokumentbeskrivelse ?dokumentbeskrivelse.
 
     ?dokumentbeskrivelse arkiv:tittel ?dok_tittel;
         arkiv:tittel_SENSITIV ?dok_tittel_SENSITIV.
 
     ?dokumentbeskrivelse arkiv:dokumentobjekt ?dokobjekt.
     ?dokobjekt arkiv:referanseDokumentfil ?referanseDokumentfil.
 } union {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
 
 
     ?id arkiv:korrespondansepart ?korrespondansepart.
 
     ?korrespondansepart arkiv:korrespondansepartNavn ?korrespondansepartNavn.
     ?korrespondansepart arkiv:korrespondansepartNavn_SENSITIV ?korrespondansepartNavn_SENSITIV.
     ?korrespondansepart arkiv:korrespondanseparttype ?korrespondanseparttype.
     OPTIONAL{?korrespondansepart arkiv:postadresse ?korrespondansepart_postadresse.}
 
 
 } union {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
 
     ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper
 
 ....
} union {
 
 VALUES (?id) {
 ( <http://difi.oep.dump/journalpost/16095564> )
 ( <http://difi.oep.dump/journalpost/16095668> )
 ( <http://difi.oep.dump/journalpost/16096571> )
 ( <http://difi.oep.dump/journalpost/16096578> )
 ( <http://difi.oep.dump/journalpost/16097726> )
 ( <http://difi.oep.dump/journalpost/16097727> )
 ( <http://difi.oep.dump/journalpost/16097887> )
 ( <http://difi.oep.dump/journalpost/16098032> )
 ( <http://difi.oep.dump/journalpost/16098073> )
 ( <http://difi.oep.dump/journalpost/16098121> )
 ( <http://difi.oep.dump/journalpost/16098122> )
 ( <http://difi.oep.dump/journalpost/16098269> )
 ( <http://difi.oep.dump/journalpost/16098830> )
 ( <http://difi.oep.dump/journalpost/16098921> )
 ( <http://difi.oep.dump/journalpost/16099311> )
 ( <http://difi.oep.dump/journalpost/16099363> )
 ( <http://difi.oep.dump/journalpost/16099581> )
 ( <http://difi.oep.dump/journalpost/16099629> )
 ( <http://difi.oep.dump/journalpost/16099940> )
 ( <http://difi.oep.dump/journalpost/16099991> )
 ( <http://difi.oep.dump/journalpost/16100574> )
 ( <http://difi.oep.dump/journalpost/16101692> )
 ( <http://difi.oep.dump/journalpost/16102344> )
 ( <http://difi.oep.dump/journalpost/16104722> )
 ( <http://difi.oep.dump/journalpost/16105101> )
 ( <http://difi.oep.dump/journalpost/16105166> )
 ( <http://difi.oep.dump/journalpost/16105523> )
 ( <http://difi.oep.dump/journalpost/16105938> )
 ( <http://difi.oep.dump/journalpost/16106001> )
 ( <http://difi.oep.dump/journalpost/16106459> )
 ( <http://difi.oep.dump/journalpost/16107065> )
 ( <http://difi.oep.dump/journalpost/16107097> )
 ( <http://difi.oep.dump/journalpost/16107202> )
 ( <http://difi.oep.dump/journalpost/16107319> )
 ( <http://difi.oep.dump/journalpost/16107752> )
 ( <http://difi.oep.dump/journalpost/16107809> )
 ( <http://difi.oep.dump/journalpost/16107965> )
 ( <http://difi.oep.dump/journalpost/16108010> )
 ( <http://difi.oep.dump/journalpost/16108322> )
 ( <http://difi.oep.dump/journalpost/16108548> )
 ( <http://difi.oep.dump/journalpost/16108622> )
 ( <http://difi.oep.dump/journalpost/16108670> )
 ( <http://difi.oep.dump/journalpost/16109328> )
 ( <http://difi.oep.dump/journalpost/16109673> )
 ( <http://difi.oep.dump/journalpost/16110402> )
 ( <http://difi.oep.dump/journalpost/16110658> )
 ( <http://difi.oep.dump/journalpost/16110825> )
 ( <http://difi.oep.dump/journalpost/16110941> )
 ( <http://difi.oep.dump/journalpost/16111131> )
 ( <http://difi.oep.dump/journalpost/16112039> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16113438> )
 ( <http://difi.oep.dump/journalpost/16113439> )
 ( <http://difi.oep.dump/journalpost/16113440> )
 ( <http://difi.oep.dump/journalpost/16113729> )
 ( <http://difi.oep.dump/journalpost/16113984> )
 ( <http://difi.oep.dump/journalpost/16113985> )
 ( <http://difi.oep.dump/journalpost/16113986> )
 ( <http://difi.oep.dump/journalpost/16114225> )
 ( <http://difi.oep.dump/journalpost/16114283> )
 ( <http://difi.oep.dump/journalpost/16115391> )
 ( <http://difi.oep.dump/journalpost/16115392> )
 ( <http://difi.oep.dump/journalpost/16115470> )
 ( <http://difi.oep.dump/journalpost/16115471> )
 ( <http://difi.oep.dump/journalpost/16115670> )
 ( <http://difi.oep.dump/journalpost/16116073> )
 ( <http://difi.oep.dump/journalpost/16116289> )
 ( <http://difi.oep.dump/journalpost/16116640> )
 ( <http://difi.oep.dump/journalpost/16116823> )
 ( <http://difi.oep.dump/journalpost/16117567> )
 ( <http://difi.oep.dump/journalpost/16118114> )
 ( <http://difi.oep.dump/journalpost/16118806> )
 ( <http://difi.oep.dump/journalpost/16118860> )
 ( <http://difi.oep.dump/journalpost/16118861> )
 ( <http://difi.oep.dump/journalpost/16118862> )
 ( <http://difi.oep.dump/journalpost/16118924> )
 ( <http://difi.oep.dump/journalpost/16118925> )
 ( <http://difi.oep.dump/journalpost/16119993> )
 ( <http://difi.oep.dump/journalpost/16120413> )
 ( <http://difi.oep.dump/journalpost/16120434> )
 ( <http://difi.oep.dump/journalpost/16120684> )
 ( <http://difi.oep.dump/journalpost/16121729> )
 ( <http://difi.oep.dump/journalpost/16121846> )
 ( <http://difi.oep.dump/journalpost/16122156> )
 ( <http://difi.oep.dump/journalpost/16122269> )
 ( <http://difi.oep.dump/journalpost/16122976> )
 ( <http://difi.oep.dump/journalpost/16123375> )
 ( <http://difi.oep.dump/journalpost/16123376> )
 ( <http://difi.oep.dump/journalpost/16123377> )
 ( <http://difi.oep.dump/journalpost/16123812> )
 ( <http://difi.oep.dump/journalpost/16124765> )
 ( <http://difi.oep.dump/journalpost/16125041> )
 ( <http://difi.oep.dump/journalpost/16125916> )
 ( <http://difi.oep.dump/journalpost/16126554> )
 ( <http://difi.oep.dump/journalpost/16126692> )
 ( <http://difi.oep.dump/journalpost/16126693> )
 ( <http://difi.oep.dump/journalpost/16127353> )
 ( <http://difi.oep.dump/journalpost/16127378> )
 ( <http://difi.oep.dump/journalpost/16127627> )
 ( <http://difi.oep.dump/journalpost/16127628> )
 }
       ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper.
       ?arkivskaper <http://data.einnsyn.no/virksomhetmeta/parent>* ?arkivskaperTransitive.
 }
 
 } 

I’ve identified an issue with the data.

 ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper.

That fragment of the query is supposed to return 1 ?arkivskaper for every ?id. At the moment it’s returning a hundred or so because of a bug with the code that generates our data from an sql database.

Still shouldn’t be failing in Stardog though. I will try to extract a smaller dataset from the sql database for you to try.

Hi Havard,

I agree that it should not be failing, only can affect performance. Are you 100% sure there’s nothing else in the server log? The root of that ArrayIndexOutOfBoundsException would explain what happened.

Cheers,
Pavel

PS. Btw, we improved handling of VALUES with multiple bindings so you’ll soon not need to duplicate those manually.

Maybe I didn’t manage to copy everything last time from the log.

ERROR 2017-03-16 16:19:27,975 [StardogServer.WorkerGroup-4] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(161): There was an error while encoding the response
com.complexible.common.protocols.EncodingException: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:426) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.annex.QueryPanelEncoder.encode(QueryPanelEncoder.java:112) ~[stardog-webconsole-annex-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	... 11 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.complexible.stardog.plan.eval.operator.impl.LeanSolutionImpl.get(LeanSolutionImpl.java:58) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SolutionComparator.compare(SolutionComparator.java:49) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SolutionComparator.compare(SolutionComparator.java:19) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:198) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp$1.computeSkipTo(AbstractTopOp.java:224) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp$1.computeSkipTo(AbstractTopOp.java:203) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp.computeSkipTo(AbstractTopOp.java:140) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp.computeSkipTo(AbstractTopOp.java:45) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.OpBasedPathStartIteratorProvider.skipTo(OpBasedPathStartIteratorProvider.java:171) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.query.paths.PredicatePlusChainIteratorImpl.skipTo(PredicatePlusChainIteratorImpl.java:177) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.query.paths.ContextAwarePredicatePlusChainIteratorImpl.skipTo(ContextAwarePredicatePlusChainIteratorImpl.java:40) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractSimplePathOp.computeSkipTo(AbstractSimplePathOp.java:99) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractSimplePathOp.computeSkipTo(AbstractSimplePathOp.java:23) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.OpBasedSolutionTable.compatibleWith(OpBasedSolutionTable.java:136) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AbstractSolutionTable.lookup(AbstractSolutionTable.java:34) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp._nextLeft(HashJoinOp.java:219) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp.computeNext(HashJoinOp.java:158) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp.computeNext(HashJoinOp.java:32) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:122) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:35) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.ProjectionOp.computeNext(ProjectionOp.java:105) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.ProjectionOp.computeNext(ProjectionOp.java:31) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:53) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:21) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:115) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.OpBasedAbstractStatementIteration.computeNext(OpBasedAbstractStatementIteration.java:86) ~[stardog-4.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.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:91) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	... 11 more
ERROR 2017-03-16 16:19:27,977 [StardogServer.WorkerGroup-4] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(171): There was an error writing the HTTP response
org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.annex.QueryPanelEncoder.encode(QueryPanelEncoder.java:112) ~[stardog-webconsole-annex-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.complexible.stardog.plan.eval.operator.impl.LeanSolutionImpl.get(LeanSolutionImpl.java:58) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SolutionComparator.compare(SolutionComparator.java:49) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.SolutionComparator.compare(SolutionComparator.java:19) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:198) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp$1.computeSkipTo(AbstractTopOp.java:224) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp$1.computeSkipTo(AbstractTopOp.java:203) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp.computeSkipTo(AbstractTopOp.java:140) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractTopOp.computeSkipTo(AbstractTopOp.java:45) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.OpBasedPathStartIteratorProvider.skipTo(OpBasedPathStartIteratorProvider.java:171) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.query.paths.PredicatePlusChainIteratorImpl.skipTo(PredicatePlusChainIteratorImpl.java:177) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.query.paths.ContextAwarePredicatePlusChainIteratorImpl.skipTo(ContextAwarePredicatePlusChainIteratorImpl.java:40) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractSimplePathOp.computeSkipTo(AbstractSimplePathOp.java:99) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.AbstractSimplePathOp.computeSkipTo(AbstractSimplePathOp.java:23) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToSkip(AbstractSkippingIterator.java:154) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.skipTo(AbstractSkippingIterator.java:208) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.OpBasedSolutionTable.compatibleWith(OpBasedSolutionTable.java:136) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AbstractSolutionTable.lookup(AbstractSolutionTable.java:34) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp._nextLeft(HashJoinOp.java:219) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp.computeNext(HashJoinOp.java:158) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.HashJoinOp.computeNext(HashJoinOp.java:32) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:85) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.UnionOp.computeNext(UnionOp.java:22) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:122) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.BindOp.computeNext(BindOp.java:35) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.ProjectionOp.computeNext(ProjectionOp.java:105) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.ProjectionOp.computeNext(ProjectionOp.java:31) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:53) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:21) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:115) ~[stardog-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:25) ~[stardog-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:143) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:130) ~[stardog-utils-common-4.2.3.jar:?]
	at com.complexible.stardog.plan.eval.operator.util.OpBasedAbstractStatementIteration.computeNext(OpBasedAbstractStatementIteration.java:86) ~[stardog-4.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.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:91) ~[stardog-utils-rdf-4.2.3.jar:?]
	... 16 more
ERROR 2017-03-16 16:19:28,577 [StardogServer.WorkerGroup-9] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(161): There was an error while encoding the response
com.complexible.common.protocols.EncodingException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:426) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.annex.QueryPanelEncoder.encode(QueryPanelEncoder.java:112) ~[stardog-webconsole-annex-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	... 11 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
ERROR 2017-03-16 16:19:28,578 [StardogServer.WorkerGroup-9] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(171): There was an error writing the HTTP response
org.openrdf.query.QueryEvaluationException: java.lang.ArrayIndexOutOfBoundsException
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:94) ~[stardog-utils-rdf-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.hasNext(ConnectionFinishQueryResult.java:75) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.server.ConnectionFinishQueryResult.next(ConnectionFinishQueryResult.java:91) ~[stardog-protocols-spec-server-4.2.3.jar:?]
	at org.openrdf.query.QueryResults.report(QueryResults.java:197) ~[sesame-query-4.0.0.jar:?]
	at org.openrdf.query.resultio.QueryResultIO.writeGraph(QueryResultIO.java:514) ~[sesame-queryresultio-api-4.0.0.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$12.encode(ResponseBodyEncoders.java:423) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$2.encode(ResponseBodyEncoders.java:104) ~[stardog-protocols-http-server-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.annex.QueryPanelEncoder.encode(QueryPanelEncoder.java:112) ~[stardog-webconsole-annex-4.2.3.jar:?]
	at com.complexible.stardog.protocols.http.server.HttpMessageEncoder.write(HttpMessageEncoder.java:158) [stardog-protocols-http-server-4.2.3.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:633) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:32) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:908) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:893) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.32.Final.jar:4.0.32.Final]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111-internal]
Caused by: java.lang.ArrayIndexOutOfBoundsException

OK, thanks, this is helpful.

I’m fairly certain it’s the issue we’ve seen recently and already fixed for 5.0. It’s hard to be 100% sure without trying on your data but 5.0 beta will be out soon so you’ll be able to try.

If this is critical, we can try to figure out a workaround. The problem is with this pattern:

?arkivskaper <http://data.einnsyn.no/virksomhetmeta/parent>* ?arkivskaperTransitive.

(or with some other * path, it’s a little hard to see if there’s more than one). One way which should fix it would be to rewrite it into a union of parent? and parent+.

Thanks,
Pavel

Hi Pavel and Stephen,

I’ve email the smallest dataset I could create to Stephen together with a query that fails.

Håvard

As for how critical this is. I’m intending to fix the underlying data, and then I expect the query to work as expected. Query definitely worked before. I’ll let you know either way.

Fixed the data and all the queries are running fine now.

Hi @pavel

Did this end up being the issue that you had already fixed for 5.0?

Cheers,
Håvard

Yes, we’ve verified that a nightly build of 5.0 does not have this problem.

Best,
Pavel

@pavel We are getting this error again after adding a few more nodes to our graf. Essentially the last * in our query matches one more node at the end of the chain.

If I query 1 resource at a time it seems to mostly work. But this is too slow for us, which is why we are using VALUES with 100 resources at a time.

How can I rewrite my query to make it work?

I presume it’s this part that is making it fail:

?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper.
       ?arkivskaper <http://data.einnsyn.no/virksomhetmeta/parent>* ?arkivskaperTransitive.

Yeah, it’s a problem with :p* patterns occurring in a specific position in the plan. The only 100% guaranteed way to avoid it is to rewrite :p* to something like { _ :p? _ } UNION { _ :p+ _ }. Beware of possible duplicates so you might need an extra DISTINCT (but you can avoid it if there’re no cycles in the data). There might also be a performance penalt, I doubt it’s a lot but you’ve got to try and see.

Cheers,
Pavel

Then I can just do this:

} union {
VALUES (?id) {}

    ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper

} union {
VALUES (?id) {}

      ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaper.
      ?arkivskaper virksomhet:parent+ ?arkivskaperTransitive.

}

union {
VALUES (?id) {}

    ?id arkiv:parent+ /arkiv:arkivskaper ?arkivskaperTransitive

}