On 29/09/11 14:10, Luis Daniel Ibáñez González wrote:
Hi,

I've been playing with Jena (v. 2.6.4 with ARQ 2.8.7) using dbpedia's
endpoint, and the following query:

SELECT  ?title (GROUP_CONCAT(?platforms) AS ?plat)
WHERE
   { ?game<http://purl.org/dc/terms/subject>  <
http://dbpedia.org/resource/Category:First-person_shooters>  .
     ?game foaf:name ?title .
     ?game dbpprop:platforms ?platforms
   }
GROUP BY ?title

parsed from String with the proper constructor yields:

Exception in thread "main" HttpException: HttpException: 400 Bad Request:
HttpException: 400 Bad Request
         at
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:337)
         at
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:189)
         at
com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:144)
         at
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:133)
         at jenatest.Main.main(Main.java:58)

either using default syntax or ARQ syntax.

If i use "Count" it works with both syntax.

Nothing special with the factories, I used:

Query query = QueryFactory.create(queryString,Syntax.syntaxARQ);
QueryExecution qexec = QueryExecutionFactory.sparqlService("
http://dbpedia.org/sparql";, query);

before the execution.

Am I doing something wrong?

No -- what it means is that DBPedia does not support GROUP_CONCAT.

400 (Bad Request) is almost certainly "syntax error".  Try their UI.

QueryEngineHTTP.execSelect sends the whole query (after local checking) to the far end.

        Andy


Thanks in advance for your help.


Reply via email to