|
Hi All, I've copied the federated query code from here. I changed the serviceEndpoint variable to
I also used throughout http://live.dbpedia.org/sparql rather than http://dbpedia.org/sparql. When I run the program, I get an empty result set. But when I try the query in a web browser against http://live.dbpedia.org/sparql it seems to work just fine (I get back a table of Tom Hanks movies). The Jena jar files are those that come with version 2.7.3 of Jena. The manual query works, the programmatic one doesn't. What am I doing wrong? Thanks for your help. -Saul |
|
All, I think I figured this out. I was again playing with the manual query at http://live.dbpedia.org/sparql and, on a whim, I removed its "Default Data Set Name (Graph IRI)" value of "http://dbpedia.org". When I then ran the query, I got no result set. So....I added another FROM statement to the source code, referencing http://dbpedia.org/ and the program now works. But I'm still not sure why the original program ever worked for any one. I'm clearly not understanding something. -Saul |


To be entirely accurate, I left the PREFIX statement as
but I changed the serviceEndpoint variable and the second SERVICE statement to reference
-Saul