Sorry for the delay - Jena graduation bootstrap.
I've identified and fixed this problem -- the fix is made in ARQ.
Tonight's development build of Fuseki will pick it up.
When using of TDB+inf graphs (not in Fuseki), then
SystemARQ.sync(dataset) or SystemARQ.sync(model) on the dataset will work.
model.close() ends up doing the same ... except the model is closed
afterwards.
e.g.
Dataset ds = DatasetFactory.assemble("assembler.ttl") ;
FileManager.get().readModel(ds.getDefaultModel(), "D.ttl") ;
SystemARQ.sync(ds) ;
Andy
On 09/05/12 09:11, Claude Warren wrote:
Andy,
My setup is messy (and at home while I am at work). I was working at
creating an extract and loading it into a TDB backed graph, so I just
grabbed the recent releases. I am running on Ubuntu. I was not closing
the graph before I exited and so caused the corruption. Adding the close
and not aborting the process in the middle solved the problem.
Claude
On Tue, May 8, 2012 at 11:03 PM, Andy Seaborne<[email protected]> wrote:
On 08/05/12 11:39, Claude Warren wrote:
I found this issue over the weekend as well, however I also found that if
you shut down the server correctly it work fine. That is, the issue will
arise in a server crash but not an orderly shutdown. I think I was using
the latest release, not SNAPSHOT.
That's possible - when there is a pile of graphs (inference on TDB-backed
graph) then the transaction mechanism isn't used and it has to revert to
using sync(). And sync() has had to change so that is a likely area for a
bug to explain teh behaviour you are seeing.
Claude - what is your setup?
The cleaned up one from Jose is:
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
@prefix
rdf:<http://www.w3.org/1999/**02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
.
@prefix
rdfs:<http://www.w3.org/2000/**01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
.
@prefix
ja:<http://jena.hpl.hp.com/**2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
.
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph<#infModel> .
<#infModel> a ja:InfModel ;
ja:baseModel<#tdbGraph>;
ja:reasoner
[ja:reasonerURL
<http://jena.hpl.hp.com/2003/**RDFSExptRuleReasoner<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
].
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:location "DB" ;
.
Note there is a command line porgramme riotcmd.infer that expands RDFS
data against a schema, removing the need to use inference at query time.
It does just subClass, subProperty, range and domain.
Andy
On Sun, May 6, 2012 at 5:08 PM, Jose Emilio Labra<[email protected]>
wrote:
I was trying with jena-fuseki-0.2.1-incubating.
However, I have just downloaded and tried
with jena-fuseki-0.2.2-incubating-**SNAPSHOT and it is the same.
It is strange, because it is able to insert new triples and it seems to
work fine, but once I restart the server, it raises that exception...
Best regards, Jose Labra
----- Mensaje original -----
De: Andy Seaborne<[email protected]>
Para: [email protected].**org<[email protected]>
CC:
Enviado: Domingo 6 de Mayo de 2012 15:36
Asunto: Re: Can I configure Jena Fuseki with inference and TDB?
On 06/05/12 13:53, Jose Emilio Labra wrote:
I want to configure Fuseki with an inference model supported by TDB.
I have been able to configure it with a Memory Model, but not with a TDB
Model where I could update triples.
I am using the following assembler description:
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
@prefix
rdf:<http://www.w3.org/1999/**02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
.
@prefix
rdfs:<http://www.w3.org/2000/**01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
.
@prefix
ja:<http://jena.hpl.hp.com/**2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
.
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
. [] ja:loadClass
"com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .<#dataset> rdf:type
ja:RDFDataset ; ja:defaultGraph<#infModel> .<#infModel> a
ja:InfModel ;
ja:baseModel<#tdbGraph>; ja:reasoner [ja:reasonerURL<
http://jena.hpl.hp.com/2003/**RDFSExptRuleReasoner<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
].<#**tdbGraph> rdf:type
tdb:GraphTDB ; tdb:location "DB" ;
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
@prefix
rdf:<http://www.w3.org/1999/**02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
.
@prefix
rdfs:<http://www.w3.org/2000/**01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
.
@prefix
ja:<http://jena.hpl.hp.com/**2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
.
@prefix
tdb:<http://jena.hpl.hp.com/**2008/tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph<#infModel> .
<#infModel> a ja:InfModel ;
ja:baseModel<#tdbGraph>;
ja:reasoner
[ja:reasonerURL
<http://jena.hpl.hp.com/2003/**RDFSExptRuleReasoner<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
].
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:location "DB" ;
.
.
It works fine and it is able to do RDFS inference and even to insert new
triples. However, once I stop and restart the server, it raises the
following exception:
Error 500: Invalid id node for subject (null node): ([000000000000001D],
[00000000000000AF], [000000000000003D])
After that, I can do a "CLEAR ALL" and insert triples again...however,
once I restart the server, I obtain the same exception...
Best regards, Jose Labra
Which version of TDB?
Do try the development snapshot:
https://repository.apache.org/**content/repositories/**
snapshots/org/apache/jena/**jena-fuseki/0.2.2-incubating-**SNAPSHOT/<https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-fuseki/0.2.2-incubating-SNAPSHOT/>
Andy