Re: HTTP QueryExecution has been closed
It's not clear from the information so far. Complete, minimal, verifiable example please. Also - what's the stacktrace you are seeing and which Jena version are you running? Andy On 27/10/2023 22:18, Martynas Jusevičius wrote: Hi, I'm trying to understand in which circumstances can the following code try (QueryExecution qex = QueryExecution.create(getQuery(), rowModel)) { return qex.execConstructDataset(); } throw the "HTTP QueryExecution has been closed" exception? Full code here: https://github.com/AtomGraph/LinkedDataHub/blob/rf-direct-graph-ids-only/src/main/java/com/atomgraph/linkeddatahub/imports/stream/csv/CSVGraphStoreRowProcessor.java#L141 The execution is not even happening over HTTP? Is it somehow closed prematurely? I can see the exception being thrown in QueryExecDataset::constructQuads: https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L211 Martynas
Re: HTTP QueryExecution has been closed
What I meant: can try-with-resources call qex.close() before constructQuads even does the checkNotClosed() check? On Fri, Oct 27, 2023 at 11:31 PM Martynas Jusevičius wrote: > > Can try-with-resources call qex.close() before constructDataset() does here? > https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L232 > > On Fri, Oct 27, 2023 at 11:18 PM Martynas Jusevičius > wrote: > > > > Hi, > > > > I'm trying to understand in which circumstances can the following code > > > > try (QueryExecution qex = QueryExecution.create(getQuery(), > > rowModel)) > > { > > return qex.execConstructDataset(); > > } > > > > throw the "HTTP QueryExecution has been closed" exception? > > Full code here: > > https://github.com/AtomGraph/LinkedDataHub/blob/rf-direct-graph-ids-only/src/main/java/com/atomgraph/linkeddatahub/imports/stream/csv/CSVGraphStoreRowProcessor.java#L141 > > > > The execution is not even happening over HTTP? Is it somehow closed > > prematurely? > > > > I can see the exception being thrown in QueryExecDataset::constructQuads: > > https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L211 > > > > Martynas
Re: HTTP QueryExecution has been closed
Can try-with-resources call qex.close() before constructDataset() does here? https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L232 On Fri, Oct 27, 2023 at 11:18 PM Martynas Jusevičius wrote: > > Hi, > > I'm trying to understand in which circumstances can the following code > > try (QueryExecution qex = QueryExecution.create(getQuery(), rowModel)) > { > return qex.execConstructDataset(); > } > > throw the "HTTP QueryExecution has been closed" exception? > Full code here: > https://github.com/AtomGraph/LinkedDataHub/blob/rf-direct-graph-ids-only/src/main/java/com/atomgraph/linkeddatahub/imports/stream/csv/CSVGraphStoreRowProcessor.java#L141 > > The execution is not even happening over HTTP? Is it somehow closed > prematurely? > > I can see the exception being thrown in QueryExecDataset::constructQuads: > https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L211 > > Martynas
HTTP QueryExecution has been closed
Hi, I'm trying to understand in which circumstances can the following code try (QueryExecution qex = QueryExecution.create(getQuery(), rowModel)) { return qex.execConstructDataset(); } throw the "HTTP QueryExecution has been closed" exception? Full code here: https://github.com/AtomGraph/LinkedDataHub/blob/rf-direct-graph-ids-only/src/main/java/com/atomgraph/linkeddatahub/imports/stream/csv/CSVGraphStoreRowProcessor.java#L141 The execution is not even happening over HTTP? Is it somehow closed prematurely? I can see the exception being thrown in QueryExecDataset::constructQuads: https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/sparql/exec/QueryExecDataset.java#L211 Martynas