I've copied the federated query code from here. I changed the serviceEndpoint variable to
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.
asked 26 Nov '12, 17:36
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.
answered 26 Nov '12, 17:59