OK - managed to recreate the situation in 4.0.0 and confirmed the situation does not occur in 4.1.0.

    Andy

On 03/06/2021 08:09, Jens Zurawski wrote:
Hi Andy,

erm, sorry, seems the test case then was too simple.

Ok, first, thanks for the info, I wasn't aware about the fact that QueryFactory is entirely local. I've made a test with parseCheckSPARQL(false) and conn.queryAsk(...) and I'm getting the same 400 Bad Request.

In fact a query which provokes a 500 Server Error is an update (e.g. INSERT) query. I've changed the test query a bit (the error already occurs with an empty dataset, so no sample data is needed) attached as InsertSPARQL.txt

In client I run with:
RDFConnectionFuseki.create()....parseCheckSPARQL(false).build();
             conn.update(queryString);

Now the server answers with a 500 Server Error and a long stack trace in the server log (attached as StackTrace.txt). Without authentication it simply returns 204 No Content, so the query by itself is not provoking the error. But from my new insights risen from your explanations, my guess is that it is "just" the escalated and not catched Exception from the underlying Query Parser in the server. So I think it will be fixed with 4.1.0, too.

Apart from that we've decided to use this IRI Authentication only as an interim solution and we want to move forward to let the server handle this authentications of federated queries. You already gave me some hints and pointers in one of your last replies and I'll try to go this way. Maybe I have some questions to this, but then I will start a new thread.

Thanks and cu
Jens



Am 02.06.2021 um 23:37 schrieb Andy Seaborne:

On 02/06/2021 12:22, Jens Zurawski wrote:

QueryFactory.create  is entirely local - it is the general parsing of a query string.

It has not gone to the Fuseki server (that happens at conn.query).

This is an error local to the application.

If I send the query string to the server, not have it parsed it locally, I get a 400 (bad request) because the query is not parsed. This is fixed in Jena 4.1.0.

To turn off local parsing:

RDFConnectionFuseki.create().parseCheckSPARQL(false)

and conn.query(queryString) or conn.queryAsk(String)

> Because 4.0.0 throws an HTTP 500 error and no warning.

Where is the 500?

The server log file will have a record of it and presumably a stack trace.

Reply via email to