Hi there,
Your setup creates an in-memory dataset and put a single graph from TDB
into that dataset and only that graph. New graphs will go into the
in-memory dataset, which isn't persistent.
SPARQL operations act on datasets.
Is there a specific reason for this setup?
To attach the whole TDB dataset to the server, use:
...
fuseki:dataset <#dataset>.
<#dataset> tdb:DatasetTDB ;
tdb:location "DB" ;
.
...
then new graphs go into TDB (transactionally).
Andy
On 11/05/14 21:01, Сергей Антоненко wrote:
Hello everybody.
I have jena-fuseki-1.0.1 configured using this file:
///
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#tdb>
) .
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
<#tdb> rdf:type fuseki:Service;
fuseki:name "tdb";
fuseki:serviceQuery "sparql";
fuseki:serviceUpdate "update";
fuseki:serviceReadWriteGraphStore "data";
fuseki:dataset <#dataset>.
tdb:GraphTDB
rdfs:subClassOf ja:Model.
<#dataset>
rdf:type ja:RDFDataset.
<#tdbGraph>
rdf:type tdb:GraphTDB;
tdb:location "DB".
///
To reproduce an error, I make this query sequence:
///
CLEAR ALL;
///
PREFIX example: <http://example.org/>
CREATE GRAPH example:graphs
///
PREFIX example: <http://example.org/>
WITH example:graphs
INSERT {
example:graph1 a example:graph.
example:graph2 a example:graph.
} WHERE {}
///
Same effect with INSERT DATA
INSERT DATA {
GRAPH example:graphs {
example:graph1 a example:graph.
example:graph2 a example:graph.
}
}
Then I perform SELECT query:
///
PREFIX example: <http://example.org/>
SELECT * WHERE {
GRAPH example:graphs {
?s ?p ?o
}
}
///
Which returns me correct result:
///
--------------------------------------------------------------------------------------
| s | p |
o |
======================================================================================
| example:graph1 | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |
example:graph |
| example:graph2 | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |
example:graph |
--------------------------------------------------------------------------------------
///
But after restarting fuseki server, the query above returns empty set. And
all the data in default graph remains in database.
Why does it happen? Is this a kind of a problem I can fix?