Hi all,
I try to publish my own sesame dataset (as a medium-sized RDF file) as linked data and provide a SPAQRL endpoint to it. I have installed openrdf-workbench and openrdf-sesame on Tomcat.
After uploading my dataset, the SPARQL endpoint for it would be:
http://localhost:8080/openrdf-sesame/repositories/my-DataID
Inside my java program, I want to send a SPARQL query using:
...
String endpointURL = "http://localhost:8080/openrdf-sesame/repositories/myData"
...
HTTPRepository endpoint = new HTTPRepository(endpointURL, "");
...
String sparqlQuery = "SELECT * WHERE {?X ?P ?Y} LIMIT 10";
....
TupleQuery query = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlQuery);
TupleQueryResult result = query.evaluate();
...
It seems the problem happened when called the evaluate() method. The error message is HTTP404. But the strange thing is that if I use the URL in a browser, the data will be returned (in a file with correct result). The URL is:
http://localhost:8080/openrdf-sesame/repositories/myData?query=SELECT * WHERE {?X ?P ?Y} LIMIT 10
I also tried querying DBpedia SPARQL endpoint in my program using the same code just with different endpointURL and got the data. So please anyone could help with this problem?
Also it seems I couldn't put Pubby on top of the sesame, if anyone has successfully deployed pubby+sesame, please could you provide your advice. Thank you.
|