On 14/01/12 01:58, June wrote:
Dear list,
I got an exception (HttpException: java.net.SocketException: Connection
reset) when I try to query through dbpedia endpoint.
I already set the timeout parameter, and I can access and query in
"http://dbpedia.org/sparql" through browser. What might be the problem?
------------------Code-----------------------------------------
com.hp.hpl.jena.query.Query query = QueryFactory.create(ask);
QueryExecution qexec = QueryExecutionFactory.sparqlService(
"http://dbpedia.org/sparql", query);
((QueryEngineHTTP)qexec).addParam("timeout", "60000") ;
boolean rs = qexec.execAsk();
-------------------Exception------------------------------------
Exception in thread "AWT-EventQueue-0" HttpException:
java.net.SocketException: Connection reset: java.net.SocketException:
Connection reset
at
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:333)
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.execAsk(QueryEngineHTTP.java:169)
Might it be a timeout at the dbpedia end?
Try with a very simple, narrow query.
Dave