Hi,
The only problem I see is the angle bracket behind Germany, which leads 
to a syntax error. Try again without it. More information about SPARQL 
queries at http://www.w3.org/TR/rdf-sparql-query.

Am 03.09.2013 11:13, schrieb bocai:
> Hi, I encountered a strange problem:
> I want to access remote dbpedia sparql endpoint throuth JENA API. I got
> different results with two different sparql query in JENA API.
> But I can get results with these two sparql query at
> http://dbpedia.org/sparql/ website.
> when I access with
> "SELECT DISTINCT ?company where {?company a 
> <http://dbpedia.org/ontology/Company>} LIMIT 3";
> I can get result as below.
> log4j:WARN No appenders could be found for logger 
> (com.hp.hpl.jena.util.FileManager).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> ----------------------------------------------------------------
> | company                                                      |
> ================================================================
> | <http://dbpedia.org/resource/%C3%9Cstra>                     |
> | <http://dbpedia.org/resource/%C4%8Cesk%C3%A9_dr%C3%A1hy>     |
> | <http://dbpedia.org/resource/7th_Level>                      |
> |----------------------------------------------------------------
> But when I access with
>   "PREFIX dbpedia: <http://dbpedia.org/resource/> " +
>    "PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> " +
> "select ?p where {?p dbpedia-owl:country dbpedia:Germany> .} LIMIT 10";
> there is not result
> But I can get result with this
> query("select ?p where {?p dbpedia-owl:country dbpedia:Germany> .} LIMIT 10";)
> at the  http://dbpedia.org/sparql  website
> p
> http://dbpedia.org/resource/%C3%96lsen
> http://dbpedia.org/resource/%C3%96stringen
> http://dbpedia.org/resource/%C3%9Cbach-Palenberg
> http://dbpedia.org/resource/%C3%9Cberherrn
> http://dbpedia.org/resource/%C3%9Cdersdorf
> http://dbpedia.org/resource/%C3%9Chlingen-Birkendorf
> http://dbpedia.org/resource/%C3%9Crzig
> http://dbpedia.org/resource/16_Blocks
> http://dbpedia.org/resource/18_%E2%80%93_Allein_unter_M%C3%A4dchen
> http://dbpedia.org/resource/2011_German_Grand_Prix
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Dbpedia-discussion mailing list
> Dbpedia-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to