On 02/12/13 16:37, zhuman.private wrote:
> Hi Andy,
>
> Sorry for the confusions.
> http://wifo5-04.informatik.uni-mannheim.de/drugbank/sparql is a SPARQL
> endpoint, so is http://wifo5-04.informatik.uni-mannheim.de/sider/sparql.
> I tried queries separately on the two end points, and both of them are
> working well. But not when querying on both of them.
>
> best regards
> June
June,
What are the messages (and stacktrace) from the server log files?
Andy
>
>> 在 2013年12月2日,23:26,Andy Seaborne <[email protected]> 写道:
>>
>>> On 02/12/13 14:33, June wrote:
>>> Dear list,
>>>
>>> I am trying to perform a federated SPARQL query by Jena arq for the
>>> first time, and I am using the latest version of Jena.
>>>
>>> But I encountered a HTTPException:500 exception for executing the
>>> following query. It will be very helpful if you can give me some tips
>>> about this problem.
>>
>> What is http://wifo5-04.informatik.uni-mannheim.de/drugbank/sparql running?
>> Is it Jena or another system?
>>
>> If it's Fuseki, what are the messages (and stacktrace) from the server log
>> file?
>>
>> Andy
>>
>>>
>>> PREFIX drugbank:
>>> <http://wifo5-04.informatik.uni-mannheim.de/drugbank/resource/drugbank/>
>>> PREFIX sider:
>>> <http://wifo5-04.informatik.uni-mannheim.de/sider/resource/sider/>
>>> PREFIX owl: <http://www.w3.org/2002/07/owl#>
>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>
>>> SELECT ?drug ?enzyme
>>> WHERE
>>> { ?drug rdf:type drugbank:drugs .
>>> ?drug drugbank:enzyme ?enzyme .
>>> ?enzyme rdf:type drugbank:enzymes
>>> SERVICE <http://wifo5-04.informatik.uni-mannheim.de/sider/sparql>
>>> { ?drugInSider owl:sameAs ?drug .
>>> ?drugInSider rdf:type sider:drugs .
>>> ?drugInSider sider:sideEffect ?sideEffect .
>>> ?sideEffect rdf:type sider:side_effects
>>> }
>>> }
>>> LIMIT 10
>>>
>>> The codes I am using are:
>>>
>>> val query = QueryFactory.create(qStr)
>>> val qexec =
>>> QueryExecutionFactory.sparqlService("http://wifo5-04.informatik.uni-mannheim.de/drugbank/sparql",
>>> query)
>>> try {
>>> val results = qexec.execSelect()
>>> while (results.hasNext()) {
>>> val result = results.next
>>> println(result.get("drug") + "\t" + result.get("enzyme"))// +
>>> "\t" + result.get("sideEffect"))
>>> }
>>> } finally {
>>> qexec.close();
>>> }
>>>
>>> Many thanks!
>>>
>>> Best wishes,
>>>
>>> June
>>