sorry.
here's my new config file
:service_tdb_all a fuseki:Service ;
fuseki:dataset :dataset ;
fuseki:name "gsip" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" .
:dataset a ja:RDFDataset ;
tdb2:defaultGraph <#model_inf> .
## tdb2:location "c:\\fuseki/run/databases/gsip".
<#model_inf> a ja:InfModel ;
ja:baseModel <#graph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
] .
<#graph> rdf:type tdb2:GraphTDB ;
tdb2:dataset :datasetTDB2 .
## Storage
:datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
tdb2:location "c:/fuseki/run/databases/gsip".
log file:
[2018-02-19 07:41:12] Server INFO Apache Jena Fuseki 3.6.0
[2018-02-19 07:41:12] Config INFO FUSEKI_HOME=C:\fuseki\.
[2018-02-19 07:41:12] Config INFO FUSEKI_BASE=C:\fuseki\run
[2018-02-19 07:41:12] Config INFO Shiro file: file://C:\fuseki\run\
shiro.in
i
[2018-02-19 07:41:12] Config INFO Configuration file:
C:\fuseki\run\config.
ttl
[2018-02-19 07:41:13] Config INFO Load configuration:
file:///C:/fuseki/run
/configuration/gsip.ttl
[2018-02-19 07:41:13] Config INFO Register: /gsip
[2018-02-19 07:41:13] Server INFO Started 2018/02/19 07:41:13 EST on
port 3
030
[2018-02-19 07:41:34] Fuseki INFO [1] POST
http://localhost:3030/gsip/sparq
l
[2018-02-19 07:41:34] Fuseki INFO [1] POST /gsip :: 'sparql' ::
[applicatio
n/x-www-form-urlencoded charset=utf-8] ?
[2018-02-19 07:41:34] Fuseki INFO [1] Query = DESCRIBE <
http://domain.org/i
d/rechargeArea/r1>
[2018-02-19 07:41:34] Fuseki INFO [1] 200 OK (40 ms)
[2018-02-19 07:41:47] Fuseki INFO [2] POST
http://localhost:3030/gsip/data
[2018-02-19 07:41:47] Fuseki INFO [2] POST /gsip :: 'data' ::
[multipart/fo
rm-data] ?
[2018-02-19 07:41:47] Fuseki INFO [2] Filename: test.ttl,
Content-Type=appl
ication/octet-stream, Charset=null => Turtle : Count=4 Triples=4 Quads=0
[2018-02-19 07:41:47] Fuseki INFO [2] 200 OK (41 ms)
[2018-02-19 07:41:51] Fuseki INFO [3] POST
http://localhost:3030/gsip/sparq
l
[2018-02-19 07:41:51] Fuseki INFO [3] POST /gsip :: 'sparql' ::
[applicatio
n/x-www-form-urlencoded charset=utf-8] ?
[2018-02-19 07:41:51] Fuseki INFO [3] Query = DESCRIBE <
http://domain.org/i
d/rechargeArea/r1>
[2018-02-19 07:41:51] Fuseki INFO [3] 200 OK (24 ms)
loading my test file and still no inference
on a interesting note: no database created in the /databases/ folder.
Thanks for your help.
Eric
2018-02-18 10:10 GMT-05:00 Andy Seaborne <[email protected]>:
> Barry NL's comment on StackOveflow looks relevant:
>
> > :dataset a ja:RDFDataset ;
> > ja:defaultGraph <#model_inf> ;
> > tdb:location "c:\\fuseki/run/databases/gsip".
> >
> >
> > <#model_inf> a ja:InfModel ;
> > ja:baseModel <#graph> ;
> > ja:reasoner [
> > ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
> > ] .
> >
> > <#graph> rdf:type tdb:GraphTDB ;
> > tdb:dataset :dataset .
> >
>
> Whaty we want is:
>
> service
> -> Dataset with inference graph as default graph
> -> inference graph uses TDB2 default graph
> -> TDB2 dataset whose dft graph is the storage
>
> ---------------------
> ## Dataset to hold the inference graph
> :dataset a ja:RDFDataset ;
> ja:defaultGraph <#model_inf> .
>
> <#model_inf> a ja:InfModel ;
> # Inference graph uses #graph as base
> ja:baseModel <#graph> ;
> ja:reasoner [
> ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
> ] .
>
> ## Base is a TDB2 graph.
> <#graph> rdf:type tdb2:GraphTDB ;
> tdb2:dataset :datasetTDB2 .
>
> ## Storage
> :datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
> tdb2:location ""c:/fuseki/run/databases/gsip".
> ---------------------
>
> I have a suspicion that the :dataset loopback results in non-deterministic
> behaviour as one item has two roles and that it worked for TDB1 is down to
> luck.
>
> Andy
>
> On 16/02/18 13:51, Eric Boisvert wrote:
>
>> So, here's my complete test
>>
>> small naive dataset
>>
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>> @prefix hy: <http://geosciences.ca/def/hydraulic#>.
>>
>> hy:rechargeZone a owl:ObjectProperty;
>> owl:inverseOf hy:sourceOf.
>> hy:sourceOf a owl:ObjectProperty.
>>
>> <http://domain.org/id/waterwells/0001>
>> hy:rechargeZone <http://domain.org/id/rechargeArea/r1>.
>>
>> so,
>>
>> DESCRIBE <http://domain.org/id/rechargeArea/r1>.
>>
>> should return
>>
>> <http://domain.org/id/rechargeArea/r1> hy:sourceOf <
>> http://domain.org/id/waterwells/0001>.
>>
>> This configuration runs, but no inference (I'm testing with standalone)
>> @prefix : <http://base/#> .
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix fuseki: <http://jena.apache.org/fuseki#> .
>> @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
>> @prefix tdb2: <http://jena.apache.org/2016/tdb#> .
>>
>>
>>
>> :service_tdb_all a fuseki:Service ;
>> fuseki:dataset :dataset ;
>> fuseki:name "gsip" ;
>> fuseki:serviceQuery "query" , "sparql" ;
>> fuseki:serviceReadGraphStore "get" ;
>> fuseki:serviceReadWriteGraphStore "data" ;
>> fuseki:serviceUpdate "update" ;
>> fuseki:serviceUpload "upload" .
>>
>> :dataset a tdb2:DatasetTDB2 ;
>> ja:defaultGraph <#model_inf> ;
>> tdb2:location "c:\\fuseki/run/databases/gsip".
>>
>>
>> <#model_inf> a ja:InfModel ;
>> ja:baseModel <#graph> ;
>> ja:reasoner [
>> ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
>> ] .
>>
>> <#graph> rdf:type tdb2:GraphTDB2 ;
>> tdb2:dataset :dataset .
>>
>> LOG: (no log file, this is the stdout of fuseki standalone. -- I assume
>> it's the same ?)
>>
>> [2018-02-16 08:26:57] Server INFO Apache Jena Fuseki 3.6.0
>> [2018-02-16 08:26:57] Config INFO FUSEKI_HOME=C:\fuseki\.
>> [2018-02-16 08:26:57] Config INFO FUSEKI_BASE=C:\fuseki\run
>> [2018-02-16 08:26:57] Config INFO Shiro file:
>> file://C:\fuseki\run\shiro.ini
>> [2018-02-16 08:26:57] Config INFO Configuration file:
>> C:\fuseki\run\config.ttl
>> [2018-02-16 08:26:57] Config INFO Load configuration:
>> file:///C:/fuseki/run/configuration/gsip.ttl
>> [2018-02-16 08:26:59] Config INFO Register: /gsip
>> [2018-02-16 08:26:59] Server INFO Started 2018/02/16 08:26:59 EST on
>> port 3030
>> [2018-02-16 08:27:12] Fuseki INFO [1] POST
>> http://localhost:3030/gsip/data
>> [2018-02-16 08:27:12] Fuseki INFO [1] POST /gsip :: 'data' ::
>> [multipart/form-data] ?
>> [2018-02-16 08:27:12] Fuseki INFO [1] Filename: test.ttl,
>> Content-Type=application/octet-stream, Charset=null => Turtle : Count=4
>> Triples=4 Quads=0
>> [2018-02-16 08:27:12] Fuseki INFO [1] 200 OK (465 ms)
>>
>> changed the configuration to
>>
>> :dataset a tdb2:DatasetTDB2 ;
>> tdb2:defaultGraph <#model_inf> ; # Changed defaultGraph
>> prefix,
>> it's cargo cult at this point
>> tdb2:location "c:\\fuseki/run/databases/gsip".
>> - stopped server
>> - deleted gsip database and wiped out system content
>> - restart
>> - reload the dataset
>>
>> still no inference (identical log)
>>
>> DESCRIBE <http://domain.org/id/rechargeArea/r1>.
>>
>> returns nothing beside prefix declaration (no error)
>>
>>
>>
>> Thanks for your help
>>
>>
>> 2018-02-15 16:47 GMT-05:00 Andy Seaborne <[email protected]>:
>>
>>
>>> From SO comments:
>>> [[
>>> Does the Fuseki log file contain any useful information? – AndyS
>>> yesterday
>>>
>>> Does non-inferred data show up? I notice you are using the same file area
>>> for TDB1 and TDB2 databases. TDB2 does not work with TDB1 databases and
>>> does not read them. In fact, its database is held with a sublocation of
>>> the
>>> tdb2:location (so TDB1 data is not corrupted - it's just completely
>>> ignored). Data must be separately loaded into TDB2. – AndyS yesterday
>>>
>>> Fuseki log folder us always empty (that's another issue I need to
>>> resolve)
>>> and , about imcompatible TDB1 and TDB2 - I wiped the database clear
>>> between
>>> tests. – Eric Boisvert 11 hours ago
>>> ]]
>>>
>>> Does non-inferred data show up?
>>> If there is no log output, something is wrong - the server always outputs
>>> to the log at startup unless you turn it off.
>>>
>>> How are you putting data into the server?
>>>
>>> Andy
>>>
>>> On 15/02/18 12:31, Eric Boisvert wrote:
>>>
>>> Greetings
>>>>
>>>> This post is a duplicate of
>>>> https://stackoverflow.com/questions/48770691/configure-fusek
>>>> i-with-tdb2-and-owl-reasoner
>>>>
>>>> I'm trying to configure fuseki to use TDB2 and OWL reasoning. I can
>>>> make
>>>> it work with TDB1 but could not find any example of the same setup with
>>>> TDB2.
>>>>
>>>> this works:
>>>>
>>>> -----
>>>>
>>>> @prefix : <http://base/#> .
>>>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>>>> @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
>>>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>>>> @prefix fuseki: <http://jena.apache.org/fuseki#> .
>>>> @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
>>>>
>>>>
>>>>
>>>> :service_tdb_all a fuseki:Service ;
>>>> fuseki:dataset :dataset ;
>>>> fuseki:name "gsip" ;
>>>> fuseki:serviceQuery "query" , "sparql" ;
>>>> fuseki:serviceReadGraphStore "get" ;
>>>> fuseki:serviceReadWriteGraphStore "data" ;
>>>> fuseki:serviceUpdate "update" ;
>>>> fuseki:serviceUpload "upload" .
>>>>
>>>> :dataset a ja:RDFDataset ;
>>>> ja:defaultGraph <#model_inf> ;
>>>> tdb:location "c:\\fuseki/run/databases/gsip".
>>>>
>>>>
>>>> <#model_inf> a ja:InfModel ;
>>>> ja:baseModel <#graph> ;
>>>> ja:reasoner [
>>>> ja:reasonerURL <http://jena.hpl.hp.com/2003/O
>>>> WLFBRuleReasoner>
>>>> ] .
>>>>
>>>> <#graph> rdf:type tdb:GraphTDB ;
>>>> tdb:dataset :dataset .
>>>>
>>>> ----
>>>>
>>>>
>>>> but my naive adaptation to TDB2 does not (I tried a couple of
>>>> variations)
>>>>
>>>>
>>>> ----
>>>>
>>>> @prefix : <http://base/#> .
>>>> @prefix tdb2: <http://jena.apache.org/2016/tdb#> .
>>>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>>>> @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
>>>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>>>> @prefix fuseki: <http://jena.apache.org/fuseki#> .
>>>>
>>>> :service_tdb_all a fuseki:Service ;
>>>> fuseki:dataset :dataset ;
>>>> fuseki:name "gsip" ;
>>>> fuseki:serviceQuery "query" , "sparql" ;
>>>> fuseki:serviceReadGraphStore "get" ;
>>>> fuseki:serviceReadWriteGraphStore "data" ;
>>>> fuseki:serviceUpdate "update" ;
>>>> fuseki:serviceUpload "upload" .
>>>>
>>>> :dataset a ja:RDFDataset ;
>>>> ja:defaultGraph <#model_inf> ;
>>>> tdb2:location "c:\\fuseki/databases/gsip"
>>>> .
>>>>
>>>> <#model_inf> a ja:InfModel ;
>>>> ja:baseModel <#graph> ;
>>>> ja:reasoner [
>>>> ja:reasonerURL <http://jena.hpl.hp.com/2003/O
>>>> WLFBRuleReasoner>
>>>> ] .
>>>>
>>>> <#graph> rdf:type tdb2:GraphTDB ; # also tried tdb2:GraphTDB2
>>>> tdb2:dataset :dataset .
>>>>
>>>> -----
>>>>
>>>> Fuseki starts without error, but OWL reason does not work (I tried with
>>>> a
>>>> simple inversedOf property that returns inferred statements in my first
>>>> setup)
>>>>
>>>> - no log files (this is another issue)
>>>> - I'm aware that TDB1 and TDB2 are not compatible, i wiped out the
>>>> database
>>>> (even change the database location) between tests.
>>>>
>>>> Read the Jena Assembler documentation, but did not find (or missed) how
>>>> to
>>>> use TBDDataset (also, new in Jena - so drinking from the firehose).
>>>>
>>>> Does anyone have an example of such a setup (TDB2 + OWLFBRuleReasoner) ?
>>>>
>>>> Thanks
>>>>
>>>> Does anyone have an exem
>>>>
>>>>
>>>>
>>