2

I'm using Apache Jena for learning SPARQL. Whenever I try to run a query I get this message:

Only one query string allowed

I have checked my queries by running it with dotNetRDF and they are working fine there.

Here's the command im using on command prompt.

arq --data -/sparql data/ex090.ttl --query -/sparql data/ex091.rq 

Can anybody tell me what I'm doing wrong?

RobV
  • 28,022
  • 11
  • 77
  • 119
faiza
  • 45
  • 4

1 Answers1

2

The error message tells you what you are doing wrong, the arq command line tool can only run one query at a time so you need to run one query and then the other.

You don't appear to be trying to do this but ARQ thinks you are because of how your command shell passes arguments to programs. You appear to have a space in your path /sparql data/ex090.ttl and this space is causing the argument to be passed as two separate arguments to ARQ hence the error message you receive.

You need to wrap your arguments in " or whatever your command shell uses to allow arguments that contain characters with special meaning e.g.

arq --data "/sparql data/ex090.ttl" --query "/sparql data/ex091.rq"
RobV
  • 28,022
  • 11
  • 77
  • 119
  • Thank you for the answer.. i tried the path using different formats its giving the error of not finding the query file. – faiza Sep 27 '14 at 03:30
  • i used this forat of query [link]https://jena.apache.org/tutorials/sparql_query1.html – faiza Sep 27 '14 at 04:58