I'm running a query using the engines end-point. Eventually I get a failure
with an exception [1] in the logs, whose underlying cause seems to be:
*Server returned HTTP response code: 500 for URL*:
http://dbpedia.org/sparql?query=SELECT+DISTINCT+?id+%0AWHERE+%7B+%0A++%7B+%0A++++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+%3Chttp://dbpedia.org/ontology/Organisation%3E+.+%0A++++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?tmp1+.+%0A++++++?tmp1+bif:contains+'%22News%22+AND+%22of%22+AND+%22the%22+AND+%22World%22'+.+%0A%7D+%0A%7D+%0AORDER+BY+DESC+(+%3CLONG::IRI_RANK%3E+(?id)+)+%0ALIMIT+20+%0A&format=application/sparql-results%2Bjson

But if I copy and paste the URL and run it with curl, I don't get 500. How
is that possible?

*$ curl -i "
http://dbpedia.org/sparql?query=SELECT+DISTINCT+?id+%0AWHERE+%7B+%0A++%7B+%0A++++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+%3Chttp://dbpedia.org/ontology/Person%3E+.+%0A++++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?tmp1+.+%0A++++++?tmp1+bif:contains+'%22James%22'+.+%0A%7D+%0A%7D+%0AORDER+BY+DESC+(+%3CLONG::IRI_RANK%3E+(?id)+)+%0ALIMIT+20+%0A&format=application/sparql-results%2Bjson
"*
HTTP/1.1 200 OK
Date: Wed, 20 Jul 2011 11:04:06 GMT
Content-Type: application/sparql-results+json; charset=UTF-8
Connection: keep-alive
Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64  VDB
Content-Length: 1830
Accept-Ranges: bytes


{ "head": { "link": [], "vars": ["id"] },
  "results": { "distinct": false, "ordered": true, "bindings": [
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Stroud"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Brown"; }},
    { "id": { "type": "uri", "value": "http://dbpedia.org/resource/Will.i.am";
}},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Horner"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Mason"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Newton_Howard"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_L._Brooks"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Garner"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/Aphex_Twin"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Woods"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Hetfield"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Earl_Jones"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Cagney"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Taylor"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Coburn"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/Henry_James"; }},
    { "id": { "type": "uri", "value": "http://dbpedia.org/resource/Sid_James";
}},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/Rick_James"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_William_Guercio"; }},
    { "id": { "type": "uri", "value": "
http://dbpedia.org/resource/James_Whitney_Young"; }} ] } }

[1] exception in the logs:

20.07.2011 14:03:35.577 *WARN* [357586160@qtp-884010469-9]
org.apache.felix.http.jetty /engines/
(org.apache.stanbol.enhancer.servicesapi.EngineException:
'NamedEntityTaggingEngine' failed to process content item
'urn:content-item-sha1-3a8f438232649baccc348accde345453f0cd7d27' with type
'text/plain':
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException:
Unable to execute query on remote site http://dbpedia.org/sparql with
entitySearcher org.apache.stanbol.entityhub.searcher.VirtuosoSearcher!)
org.apache.stanbol.enhancer.servicesapi.EngineException:
'NamedEntityTaggingEngine' failed to process content item
'urn:content-item-sha1-3a8f438232649baccc348accde345453f0cd7d27' with type
'text/plain':
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException:
Unable to execute query on remote site http://dbpedia.org/sparql with
entitySearcher org.apache.stanbol.entityhub.searcher.VirtuosoSearcher!
at
org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine.computeEnhancements(NamedEntityTaggingEngine.java:323)
at
org.apache.stanbol.enhancer.jobmanager.impl.InMemoryJobManager.enhanceContent(InMemoryJobManager.java:62)
at
org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceAndBuildResponse(EnginesRootResource.java:163)
at
org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceFromForm(EnginesRootResource.java:127)
(...)
Caused by:
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException:
Unable to execute query on remote site http://dbpedia.org/sparql with
entitySearcher org.apache.stanbol.entityhub.searcher.VirtuosoSearcher!
at
org.apache.stanbol.entityhub.core.impl.ReferencedSiteImpl.findEntities(ReferencedSiteImpl.java:318)
at
org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine.computeEntityRecommentations(NamedEntityTaggingEngine.java:408)
at
org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine.computeEnhancements(NamedEntityTaggingEngine.java:320)
... 44 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for
URL:
http://dbpedia.org/sparql?query=SELECT+DISTINCT+?id+%0AWHERE+%7B+%0A++%7B+%0A++++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+%3Chttp://dbpedia.org/ontology/Organisation%3E+.+%0A++++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?tmp1+.+%0A++++++?tmp1+bif:contains+'%22News%22+AND+%22of%22+AND+%22the%22+AND+%22World%22'+.+%0A%7D+%0A%7D+%0AORDER+BY+DESC+(+%3CLONG::IRI_RANK%3E+(?id)+)+%0ALIMIT+20+%0A&format=application/sparql-results%2Bjson
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at
org.apache.stanbol.entityhub.site.linkeddata.impl.SparqlEndpointUtils.sendSparqlRequest(SparqlEndpointUtils.java:49)
at
org.apache.stanbol.entityhub.site.linkeddata.impl.VirtuosoSearcher.findEntities(VirtuosoSearcher.java:90)
at
org.apache.stanbol.entityhub.core.impl.ReferencedSiteImpl.findEntities(ReferencedSiteImpl.java:316)
... 46 more


-- 
David Riccitelli

Interact SpA
Via A. Bargoni 78 (scala F)
00153 Roma

T +39 06 58318 301
F +39 06 58318 303

Reply via email to