Failed to run query: 000012: Operation not supported for streaming result sets (Internal Server Error)

Hi,
I was trying to create a virtual graph in Stardog without providing any R2RML or SMS files. My data source is in my local MySql Server and the data is the one provided in StarDog's virtual graph tutorial with this schema and data. It successfully creates the virtual graph but when I try to run some queries I get this error(given in the title). But some of the queries run.
One which doesn't work is:

CONSTRUCT {
?s ?p ?o
}WHERE{
GRAPH <virtual://music>{
?s ?p ?o
}

}

Even the COPY command doesn't work and gives the same error.
Any help will be appreciated.

Thanks,
Anurag

Hi Anurag,

Please attach the portion of the stardog.log file that relates to this error.

Thanks,

-Paul

Anurag,

try below:

construct {?s ?p ?o} where {graph <virtual://music> { select * where {?s ?p ?o}} }

Prodipta.

Hi,

I tried your given query but it gives the same result.

Anurag.

Hi Paul,

The portion of the log file you had requested:

WARN 2020-02-22 15:56:49,212 [stardog-user-4] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
com.mysql.jdbc.OperationNotSupportedException: Operation not supported for streaming result sets
at com.mysql.jdbc.RowDataDynamic.notSupported(RowDataDynamic.java:403) ~[mysql-connector-java-5.1.48.jar:5.1.48]
at com.mysql.jdbc.RowDataDynamic.getCurrentRowNumber(RowDataDynamic.java:222) ~[mysql-connector-java-5.1.48.jar:5.1.48]
at com.mysql.jdbc.ResultSetImpl.getRow(ResultSetImpl.java:4882) ~[mysql-connector-java-5.1.48.jar:5.1.48]
at com.complexible.stardog.virtual.vega.mapping.TemplateTermMap$1.createValue(TemplateTermMap.java:231) ~[stardog-virtual-core-7.1.2.jar:?]
at com.complexible.stardog.virtual.ValueGenerator$AbstractValueGenerator.generateValue(ValueGenerator.java:100) ~[stardog-virtual-core-7.1.2.jar:?]
at com.complexible.stardog.virtual.VirtualGraphStatementIterator.computeValue(VirtualGraphStatementIterator.java:40) ~[stardog-virtual-core-7.1.2.jar:?]
at com.complexible.stardog.virtual.VirtualGraphStatementIterator.computeValue(VirtualGraphStatementIterator.java:26) ~[stardog-virtual-core-7.1.2.jar:?]
at com.complexible.stardog.virtual.VirtualGraphIterator.computeNext(VirtualGraphIterator.java:156) ~[stardog-virtual-core-7.1.2.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-26.0-jre.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-26.0-jre.jar:?]
at com.complexible.stardog.virtual.StatementToSolutionIterator.hasNext(StatementToSolutionIterator.java:47) ~[stardog-virtual-core-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:93) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:33) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:87) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:29) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.LazySortedGroupify$1.computeNext(GroupifyAlgorithms.java:390) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.LazySortedGroupify$1.computeNext(GroupifyAlgorithms.java:381) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:161) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.AbstractGroupOp.computeNext(AbstractGroupOp.java:34) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:58) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.DistinctOp.computeNext(DistinctOp.java:21) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:119) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:26) ~[stardog-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.operator.util.OpBasedAbstractStatementIteration.computeNext(OpBasedAbstractStatementIteration.java:71) ~[stardog-7.1.2.jar:?]
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-26.0-jre.jar:?]
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-26.0-jre.jar:?]
at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:93) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.stardog.plan.eval.TransactionManagedQueryResult.next(TransactionManagedQueryResult.java:81) ~[stardog-7.1.2.jar:?]
at com.stardog.stark.io.RDFWriters.write(RDFWriters.java:196) ~[stardog-stark-io-api-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:581) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:509) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:129) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.post(SPARQLProtocol.java:94) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]

Thanks,
Anurag.

Please try adding these JDBC connection parameters to your connection URL:

UseStreamingResults=false&useCursorFetch=true&defaultFetchSize=10000

-Paul

Hi Paul,

I used this connection url: jdbc.url=jdbc:mysql://localhost/music?UseStreamingResults=false&useCursorFetch=true&defaultFetchSize=10000
but still the error persists.

Thanks,
Anurag

Try adding those properties in driver option or other options from studio instead of parameters in jdbc url

I see, it has to do with us calling ResultSet.getRow, which we do when we map row numbers to bnodes, which, in turn, we do when we generate mappings for tables with no primary key. You either add a primary (or unique) key constraint, or reload our auto-generated mappings. To do the latter:

stardog-admin virtual options vgname > vgname.properties
stardog-admin virtual mappings vgname > vgname.mappings
stardog-admin virtual add -o vgname.properties vgname.mappings

-Paul

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