Service via post

Hi all, we notice that the service clause in stardog execute a GET request in the target endpoint.

The problem with GET request is that long queries cannot be processed.

Is it possible to execute it as a POST request?

Best,

ERROR 2017-05-19 18:06:43,471 [StardogServer.WorkerGroup-14] com.complexible.stardog.protocols.http.server.HttpMessageEncoder:write(171): There was an error writing the HTTP response
org.openrdf.query.QueryEvaluationException: com.complexible.stardog.plan.eval.operator.OperatorException: Server returned HTTP response code: 414 for URL: http://admin:admin@stardog.internal.geophy.com:5820/coredb/query?query=SELECT+%3Ffunctional_area+%3Finput+%3Fpurpose+%3Fcomponent+%3Fdefinition+%3Fkey+%3Fformula+%3Fconstruction_year+%3Frenovation_year+%3Fstructural_year+ WHERE+{ ++%3Ffunctional_area+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23building_detail>+%3Finput. ++%3Ffunctional_area+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23actual_purpose>+%3Fpurpose. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23service>+<http%3A%2F%2Fgeophy.io%2Fontologies%2Fservices%23year_of_construction>. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23defined_by>+%3Fdefinition. ++%3Fdefinition+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23purpose>+%3Fpurpose. ++%3Fdefinition+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23key>+%3Fkey. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23formula>+%3Fformula. ++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23construction_year>+%3Fconstruction_year. ++OPTIONAL+{ ++++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23renovation_year>+%3Frenovation_year ++}. ++OPTIONAL+{ ++++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23structural_renovation_year>+%3Fstructural_year ++}. ++VALUES+(%3Finput)+{ ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F5>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F12>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F32>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F47>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F49>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F57>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F58>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F112>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F167>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F181>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F194>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F198>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F221>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F263>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F272>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F293>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F304>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F332>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F358>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F362>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F370>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F394>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F395>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F402>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F405>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F408>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F414>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F425>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F428>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F437>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F450>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F513>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F519>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F538>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F549>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F574>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F582>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F645>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F660>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F676>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F679>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F689>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F692>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F695>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F717>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F761>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F771>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F792>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F798>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F807>) ++} }
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.http.annex.QueryPanelEncoder$GraphQueryResultAsTupleQueryResult.hasNext(QueryPanelEncoder.java:169) ~[stardog-webconsole-annex-4.2.3.jar:?]
at org.openrdf.query.QueryResults.report(QueryResults.java:158) ~[sesame-query-4.0.0.jar:?]
at org.openrdf.query.resultio.QueryResultIO.writeTuple(QueryResultIO.java:449) ~[sesame-queryresultio-api-4.0.0.jar:?]
at com.complexible.stardog.protocols.http.server.io.ResponseBodyEncoders$13.encode(ResponseBodyEncoders.java:470) ~[stardog-protocols-http-server-4.2.3.jar:?]
at com.complexible.stardog.protocols.http.annex.QueryPanelEncoder.encode(QueryPanelEncoder.java:115) ~[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_121]
Caused by: com.complexible.stardog.plan.eval.operator.OperatorException: Server returned HTTP response code: 414 for URL: http://admin:admin@stardog.internal.geophy.com:5820/coredb/query?query=SELECT+%3Ffunctional_area+%3Finput+%3Fpurpose+%3Fcomponent+%3Fdefinition+%3Fkey+%3Fformula+%3Fconstruction_year+%3Frenovation_year+%3Fstructural_year+ WHERE+{ ++%3Ffunctional_area+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23building_detail>+%3Finput. ++%3Ffunctional_area+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23actual_purpose>+%3Fpurpose. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23service>+<http%3A%2F%2Fgeophy.io%2Fontologies%2Fservices%23year_of_construction>. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23defined_by>+%3Fdefinition. ++%3Fdefinition+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23purpose>+%3Fpurpose. ++%3Fdefinition+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23key>+%3Fkey. ++%3Fcomponent+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frank%2Fmeta%23formula>+%3Fformula. ++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23construction_year>+%3Fconstruction_year. ++OPTIONAL+{ ++++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23renovation_year>+%3Frenovation_year ++}. ++OPTIONAL+{ ++++%3Finput+<http%3A%2F%2Fgeophy.io%2Fontologies%2Frealestate%23structural_renovation_year>+%3Fstructural_year ++}. ++VALUES+(%3Finput)+{ ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F5>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F12>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F32>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F47>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F49>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F57>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F58>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F112>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F167>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F181>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F194>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F198>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F221>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F263>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F272>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F293>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F304>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F332>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F358>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F362>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F370>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F394>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F395>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F402>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F405>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F408>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F414>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F425>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F428>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F437>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F450>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F513>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F519>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F538>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F549>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F574>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F582>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F645>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F660>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F676>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F679>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F689>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F692>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F695>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F717>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F761>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F771>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F792>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F798>) ++++(<http%3A%2F%2Fgeophy.io%2Fbuildings%2F807>) ++} }
at com.complexible.stardog.plan.eval.service.SPARQLService.evaluate(SPARQLService.java:103) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:116) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:37) ~[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.SingleProjectionOp.computeNext(SingleProjectionOp.java:83) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:33) ~[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.SliceOp._hasNext(SliceOp.java:87) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:95) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SliceOp.computeNext(SliceOp.java:26) ~[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.SingleProjectionOp.computeNext(SingleProjectionOp.java:83) ~[stardog-4.2.3.jar:?]
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:33) ~[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:?]
... 15 more

Hi, how are you submitting this query? HTTP, CLI, Webconsole, or some other method? Our /db/query endpoint does accept POST requests for explicitly this reason.

The query is submitted by stardog itself, as It is part of a clause service
into another sparql query.

Aparently stardog fires a get request for any service clause. I wonder if
it could be a post request instead.

Hi Samur, I have found where this is happening and I’ve opened up an internal ticket to address it. Look for a fix in an upcoming release. Thanks for the report!

Dear Sephen, could you please inform me, on which release was the issue above fixed?

You can always keep an eye out for resolved issues in the release notes.

I already check it. It is not there. I need to know the first release where the issue was fixed.