Construct query fails in Java API but not in Admin Console

Hi there,

I created a database and loaded https://github.com/stardog-union/stardog-examples/blob/develop/examples/api/data/catalog.rdf. Stardog version 5.2.2.

Then ran the following code

GraphQueryResult gqr = conn.graph("construct {?s ?p ?o} where {?s ?p ?o}").execute();

which failed with the following stacktrace.

2018-04-03 17:26:47.803 WARN 11248 --- [reamProcessor-0] c.c.common.rdf.rio.RDFStreamProcessor : Error during loading TriGStream: IRI included an unencoded space: '32' [line 116908]
2018-04-03 17:26:47.815 WARN 11248 --- [reamProcessor-0] c.c.common.rdf.rio.RDFStreamProcessor : Parse process creator:

java.lang.Exception: null
at com.complexible.common.rdf.rio.RDFStreamProcessor.(RDFStreamProcessor.java:129) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.common.rdf.rio.RDFStreamProcessor.create(RDFStreamProcessor.java:105) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.common.rdf.rio.RDFStreamProcessor.iteration(RDFStreamProcessor.java:110) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.common.rdf.impl.StreamStatementIterator.(StreamStatementIterator.java:52) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.common.rdf.impl.StatementIterators.create(StatementIterators.java:62) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.common.rdf.impl.StatementIterators.create(StatementIterators.java:58) ~[stardog-utils-rdf-5.2.2.jar:na]
at com.complexible.stardog.protocols.http.client.HttpClientImpl.graph(HttpClientImpl.java:335) ~[stardog-protocols-http-client-5.2.2.jar:na]
at com.complexible.stardog.protocols.http.client.HttpConnection._graph(HttpConnection.java:161) ~[stardog-protocols-http-client-5.2.2.jar:na]
at com.complexible.stardog.api.impl.AbstractConnection.executeGraph(AbstractConnection.java:440) ~[stardog-api-5.2.2.jar:na]
at com.complexible.stardog.api.impl.GraphQueryImpl.execute(GraphQueryImpl.java:33) ~[stardog-api-5.2.2.jar:na]
at com.complexible.stardog.api.impl.GraphQueryImpl.execute(GraphQueryImpl.java:23) ~[stardog-api-5.2.2.jar:na]

I ran the same query on the Query tab in admin console and it returned a result with no error in stardog.log.

Please advise!

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