I'm dealing with a problem that I can't execute the same query (see Example below) multiple times against DBpedia, because the execution freezes after like 4-5 queries.
The thing is, with the same Apache Jena Code, I can execute hundreds of same queries against Wikidata (see Example below) without a problem. The Apache Jena Code is literally standard code (see below). The result is just returned as a normal string value. I also tried variations here, but that's not the issue.
Apache Jena Code Snippet from the DBpedia query (Wikidata is basically the same except the createServiceRequest
-Method uses https://query.wikidata.org/sparql
)
Query query = queryFactory.create(**!!see Query Example below!!**);
QueryEngineHTTP queryEngine = QueryExecutionFactory.createServiceRequest("http://de.dbpedia.org/sparql",
query);
ResultSet results = queryEngine.execSelect();
for (; results.hasNext();) {
QuerySolution solution = results.nextSolution();
String stringElement = solution.getLiteral("item").toString();
stringArray.add(stringElement);
// stringArray is then returned simply with System.out.println
}
DBpedia Query:
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dbpprop-de: <http://de.dbpedia.org/property/>
prefix dbpedia-de: <http://de.dbpedia.org/resource/>
SELECT DISTINCT ?item WHERE {
dbpedia-de:Deutschland dbpprop-de:hauptstadt ?y .
?y rdfs:label ?item
}
Wikidata Query:
prefix wdt: <http://www.wikidata.org/prop/direct/>
prefix wd: <http://www.wikidata.org/entity/>
prefix wikibase: <http://wikiba.se/ontology#>
prefix bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?itemLabel WHERE {
wd:Q183 wdt:P36 ?item .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
}
}
Is there some kind of Execution Limit on queries for users in DBpedia? I know there are limits on ResultSets, but that's not the issue here as i only get like one result per one query back. It would be really helpful as i couldn't find a similar problem. Thanks in advance.