Thanks a lot for all these elements Andy.
and fails sometimes/. Any clue about what's happening? I find it very
etc). Could it be linked to some http connection problem?
Post by Andy SeaborneThe /MyDataset/ is slightly magic.
Fuseki inspects the request and determines if it is a query or an update.
1/ The URL query string of the request URI has ?query= in it. (GET or
HTML form)
2/ The content type is application/sparql-query (POST)
3/ The URL update string is ?update= (GET or HTML form - GET wil be
bounced later on).
4/ The content type is application/sparql-update (POST)
The code is in ServiceRouter.chooseOperation(HttpAction,DataService)
It returns the determines operation which then is used to direct to
the request to the right code - query or update.
If sent to /query or /update the Fuseki knows it is a query or update
directly. There is still checking.
The logs shows the system the system detected the request as a POSTed
query (from YASQE - Fuseki uses a 3rd part SPARQL javascript editor)
because it logs "Query =" then parses it as query where DELETE is not
allowed.
This becomes more important at Fuseki 3.10 because the next version
supports access control so query vs update matters more.
s-update will send it as an update using POST with the right content type.
This is not to do with browsers.
   Andy
Post by Vincent VentresqueThanks Andy.
I don't understand : 'update' queries work in UI most of the time
(and when I re-write this 'delete' query, it works... Of course I
have to give http://localhost:3030/MyDataset or
http://localhost:3030/MyDataset/update as endpoint url (above dialog
box), not http://localhost:3030/MyDataset/query).
Besides, I'm not sure the problem didn't occur with 'select' or other
'read-only' queries (I'll report the case if it happens).
https://sourceforge.net/projects/ffl-misc/files/fuseki_strange_errors ) says
Encountered " "delete" "delete "" at line 19, column 1.
    "base" ...
    "prefix" ...
    "select" ...
    "json" ...
    "describe" ...
    "construct" ...
    "ask" ...
     (7 ms)
and not 'delete', 'insert', so maybe the parser doesn't like updates
as you said.
-- Another case, maybe irrelevant for this problem, where I get
errors : I often try a query in the UI first, and then copy-paste the
string in a custom script to reuse it with command-line tools (the
script passes the query string to other scripts such as s-query,
tdbquery, s-update). I noticed that the 'auto-formatting'
(indentation, spaces, code folds, etc) in the UI dialog box inserts
'special characters' and sometimes I have to chop them to get the
script working. Maybe there's something wrong with a special
character in this 'delete' query too? (N.B. : I don't remember if the
error message is 'lexical error' or 'parse error' in this case)
-- a final point (don't know if it's relevant either) : I use only
Firefox, didn't try with other browsers. Do you think the problem
could be linked to javascript or some other piece of the web
interface in firefox (maybe a bug in firefox itself) ?
Post by Andy SeaborneVincent,
It's a parse because DELETE is SPARQL Update and the query editor is
for query. In SPARQL, they are different languages.
There is some way (IIRC) to use the UI with update but I can't
remember how - maybe someone else can answer that part.
   Andy
Post by Vincent VentresqueHello,
Sometimes I have a '400 Parse error' when typing a query in Fuseki UI.
-- Here, the query string 'delete {?s ?p ?o } where {?s ?p ?o }'
doesn't work at first. N.B.: I hadn't pasted the string from other
software, everything had been typed in the query dialog box.
-- If I change the string for a construct query (cut 'delete', type
'construct' instead), it's ok. Then I cut 'construct' and type
'delete' again, this time it works.
-- Nothing in log file
I get this error with fuseki 3.9.0 and 3.5.0.
I've uploaded a screenshot of the UI + a .txt file where you can
https://sourceforge.net/projects/ffl-misc/files/fuseki_strange_errors
Do you have encountered this problem? Do you know where it comes from?
Thanks in advance,
Vincent