2

I have a problem with the DBpedia SPARQL endpoint. When I call this query it doesn't return any results:

SELECT DISTINCT * WHERE {
  <http://dbpedia.org/resource/Santiago_Bernabéu_Stadium> rdfs:label ?label . 
  OPTIONAL {
    <http://dbpedia.org/resource/Santiago_Bernabéu_Stadium> geo:lat ?lat ;
                                                            geo:long ?long .
  }
}

SPARQL results

But when I change the URL to something like <http://dbpedia.org/resource/Sierra_Nevada_(Spain)> it works perfectly. I call it from Java using Apache Commons HttpClient (tried with POST and GET). I think the problem is in é with accent, but I can´t find any encoding solving my problem. Do you know how could I fix it?

Joshua Taylor
  • 80,876
  • 9
  • 135
  • 306
Piotr Idzikowski
  • 713
  • 5
  • 13

2 Answers2

1

It looks I found the answer. Using URLEncoder was not solution as long it was changing other characters (like braces). But I've found that I should use URIref class from Jena. Problem solved!

Piotr Idzikowski
  • 713
  • 5
  • 13
0

I have solved this problem updating the jena library. Search and and use the last version of all jar files. For example, I was using jena-2.6.3 and now I am using jena-arq-2.9.3.jar, jena-core-2.7.3-test.jar, jena-2.7.3.jar, jena-iri-0.9.3.jar, etc.

walter
  • 1