Thanks Andy. Yes you are right. It might be some other problem. Whatever, now I can execute such query in Jena.
On Tue, Jul 30, 2013 at 4:55 PM, Andy Seaborne <[email protected]> wrote: > 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--<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--<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--<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/ <http://localhost:8890/conductor/> ), >> I can execute and get result. >> Please share your idea on executing this double dash resource-based query >> in Jena >> >> >> >> >> >> > -- *Md Mizanur Rahoman* PhD Student The Graduate University for Advanced Studies National Institute of Informatics 2-1-2 Hitotsubashi, Chiyoda-ku, Tokyo 101-8430, Japan. Cell # +81-80-4076-9044 email: [email protected] Web: http://www.nii.ac.jp/en/ & Lecturer, Department of Computer Science & Engineering Begum Rokeya University, Rangpur, Bangladesh. email: [email protected], [email protected] Cell # +88 01823 806618 Web: http://www.brur.ac.bd
