Search code examples
sparqlgraphdb

graphDB SPARQL Error 501: Not Implemented


On a fresh install of graphDB, in the SPARQL web UI tab, I receive a HTML501 error: Not Implemented when some statements (ORDER BY for example) are present in the SPARQL query.

Additional tests:

  • I get error 501, no matter if the statement is commented out or not (see examples below)
  • I get error 501 with a REST API request (This is used by the graphDB web UI)
  • no error through a POST in graphDB API request
  • no error on a local instance of graphDB
  • nothing is written in graphDB logs

What does this error means?

So it seems to be an error in the http string before any graphDB SPARQL process.

Examples in web UI:

This works fine:

SELECT ?p (COUNT(?p) as ?count) WHERE
    {
         ?s ?p ?o .
    }
GROUP BY ?p

With ORDER BY statement, I get error 501:

SELECT ?p (COUNT(?p) as ?count) WHERE
    {
         ?s ?p ?o .
    }
GROUP BY ?p
ORDER BY DESC(?count)

With ORDER BY statement commented, I get error 501:

SELECT ?p (COUNT(?p) as ?count) WHERE
    {
         ?s ?p ?o .
    }
GROUP BY ?p
#ORDER BY DESC(?count)

Any idea ?


Solution

  • As expected the problem was before the graphDB instance.
    The Web Application Firewall (WAF) blocked some string to prevent from SQL injection.