3

I have Jena-Fuseki server accessed via browser at http://localhost:3030/sparql.html. The query

select * where { }

results in an error:

Error 400: No dataset description in protocol request or in the query string

The query

select * from <http://xmlns.com/foaf/0.1/> where {}

results in an empty table.

  1. Example queries at 2.1 Writing a Simple Query from the SPARQL specification do not require a 'from' clause. How to configure Jena so that examples execute without errors?
  2. How to make a query to know which datasets are present in a database?
Cœur
  • 37,241
  • 25
  • 195
  • 267
Alexei Kaigorodov
  • 13,189
  • 1
  • 21
  • 38

2 Answers2

5

The endpoint "/sparql.html" is a general SPARQL query engine and needs to be told where to get the data from. That can be in protocol or with "FROM".

Fuseki can also be configured to have SPARQL services acting on a specific database. The URL will look like

http://localhost:3030/DATASET/sparql

where DATASET is your choice of name. See the documentation on configuration. http://jena.apache.org/documentation/serving_data/

[Jan2015] Fuseki1 requires datasets to be given on the command line or configuration. Fuseki2, soon to be released, has a UI for creating new datasets in a running server as well as the Fuseki1 style configuration.

AndyS
  • 16,345
  • 17
  • 21
1

Its easy to miss the first time you use Fuseki, but you've got to navigate to your dataset, and from there, there's a special query box for that dataset.

  1. start at http://localhost:3030/
  2. click on Control Panel
  3. Select your dataset from the dropdown menu, click "select"
  4. run a query
Kristian
  • 21,204
  • 19
  • 101
  • 176