On 30/07/13 08:16, Md. Mizanur Rahoman wrote:
Dear All,

In my local virtuoso server, for graph <http://dbpedia.org>, I am trying to
execute simple query like

select *
from   <http://dbpedia.org>
where {<http://dbpedia.org/resource/If--> ?p ?o};

 From isql-vt (SQL command prompt), I can not execute.

Not a Jena issue at this point. You'll have to ask Openlink about that issue.

Since subject positioned resource holds double dash (--) (see above), it
might consider this double dash as a comment. So can not execute.

When Jena is parsing --> has nothing to do with comments.


I tried the same query with Jena (Version 2.6.4),

was release Dec 2010. That is sometime ago; an upgrade would be a good idea.

it also throws error like
:


Exception in thread "main" com.hp.hpl.jena.query.QueryParseException:
Encountered " <IRIref> "<http://dbpedia.org/resource/If--> "" at line 1,
column 18.

What string exactly are you parsing because line 1, column 18 does not correspond the <http://dbpedia.org/resource/If--> in the above query.

It looks to me as if the string passed to the parser does not correcsond to the one shown. Maybe print out the string in your program to check you have what you expect.

        Andy

Was expecting one of:
     <VAR1> ...
     <VAR2> ...
     "(" ...
     "*" ...

     at
com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:87)
     at
com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse(ParserSPARQL11.java:40)
     at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:132)
     at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:69)
     at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
     at tempQueryGen.test.simpleQuery(test.java:32)
     at tempQueryGen.test.main(test.java:70)



Interestingly, from Vrituoso web console (i.e.,
http://localhost:8890/conductor/ ), I can execute and get result.
Please share your idea on executing this double dash resource-based query
in Jena






Reply via email to