You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Gowrisankar Paramasivam <pg...@msn.com> on 2020/12/27 03:23:44 UTC

Fuseki OWL Reasoner Configuration

I am new to Apache Jena and Fuseki.

I was able to run the docker version of Fuskei (jena-fuseki-docker-3.17.0 distribution) successfully. However, I am not that successful with being able to run Fuskei with any reasoner.  Appreciate any help you can

In order to narrow down the problem, I am now running Fuseki in Standalone mode in Windows 10

> fuseki-server --tdb2 --loc data -v --update /ds

I modified the Template file (config-tdb2-dir) at ./run/templates/config-tdb2-dir

# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
#
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 tdb2:    <http://jena.apache.org/2016/tdb#>
PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
#
## ---------------------------------------------------------------
## Updatable TDB2 dataset with all services enabled.

<#service_tdb_all>
rdf:type fuseki:Service ;
    rdfs:label                         "TDB2 {NAME}" ;
    fuseki:name                        "{NAME}" ;
    fuseki:serviceQuery                "" ;
    fuseki:serviceQuery                "sparql" ;
    fuseki:serviceQuery                "query" ;
    fuseki:serviceUpdate               "" ;
    fuseki:serviceUpdate               "update" ;
    fuseki:serviceUpload               "upload" ;
    fuseki:serviceReadWriteGraphStore  "data" ;
    fuseki:serviceReadGraphStore       "get" ;
#    fuseki:dataset                     <#tdb_dataset_readwrite> ;
    fuseki:dataset                     <#inferred_dataset> ;
    .

<#tdb_dataset_readwrite> rdf:type      tdb2:DatasetTDB2 ;
tdb2:location "{DIR}" ;
##tdb2:unionDefaultGraph true ;
.

<#inferred_dataset> a ja:RDFDataset ;
    ja:defaultGraph <#inference_model>
.

<#inference_model> a ja:InfModel ;
ja:reasoner [ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner>] ;
    ja:baseModel <#tdb_graph>
.

<#tdb_graph> a tdb2:GraphTDB  ;
tdb2:dataset <#tdb_dataset_readwrite>  ;


I am getting the following exception

21:16:19 INFO  Config          :: Template file: templates/config-tdb2-dir
21:16:20 ERROR Server          :: Exception in initialization: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
21:16:20 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@2c88a3e8{Apache Jena Fuseki Server,/,file:///C:/developer/graph/bin/apache-jena-fuseki-3.17.0/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
        at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142) ~[fuseki-server.jar:3.17.0]
        at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93) ~[fuseki-server.jar:3.17.0]
        at org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74) ~[fuseki-server.jar:3.17.0]

I could figure out what I am missing. Appreciate any help you can with this.

Thank You
Gowrisankar

Re: Fuseki OWL Reasoner Configuration

Posted by Gowrisankar Paramasivam <pg...@msn.com>.
Thank You Andy ad Sorin

I was using Fuseki full but was relying on a template to get picked-up based on the cmd line options --tdb2 --loc data . Using explicit --config worked.

I assumed that the template file will get automatically applied with the right DIR and dataset NAME.

Thank You
Gowrisankar
________________________________
From: Sorin Gheorghiu <so...@uni-konstanz.de>
Sent: Sunday, December 27, 2020 11:22 PM
To: users@jena.apache.org <us...@jena.apache.org>
Subject: Re: Fuseki OWL Reasoner Configuration

try with

<#tdb_graph> rdf:type tdb2:GraphTDB ;
     tdb2:dataset <#tdb_dataset_readwrite> ;


Am 27.12.2020 um 04:23 schrieb Gowrisankar Paramasivam:
> I am new to Apache Jena and Fuseki.
>
> I was able to run the docker version of Fuskei (jena-fuseki-docker-3.17.0 distribution) successfully. However, I am not that successful with being able to run Fuskei with any reasoner.  Appreciate any help you can
>
> In order to narrow down the problem, I am now running Fuseki in Standalone mode in Windows 10
>
>> fuseki-server --tdb2 --loc data -v --update /ds
> I modified the Template file (config-tdb2-dir) at ./run/templates/config-tdb2-dir
>
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> #
> 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 tdb2:    <http://jena.apache.org/2016/tdb#>
> PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
> #
> ## ---------------------------------------------------------------
> ## Updatable TDB2 dataset with all services enabled.
>
> <#service_tdb_all>
> rdf:type fuseki:Service ;
>      rdfs:label                         "TDB2 {NAME}" ;
>      fuseki:name                        "{NAME}" ;
>      fuseki:serviceQuery                "" ;
>      fuseki:serviceQuery                "sparql" ;
>      fuseki:serviceQuery                "query" ;
>      fuseki:serviceUpdate               "" ;
>      fuseki:serviceUpdate               "update" ;
>      fuseki:serviceUpload               "upload" ;
>      fuseki:serviceReadWriteGraphStore  "data" ;
>      fuseki:serviceReadGraphStore       "get" ;
> #    fuseki:dataset                     <#tdb_dataset_readwrite> ;
>      fuseki:dataset                     <#inferred_dataset> ;
>      .
>
> <#tdb_dataset_readwrite> rdf:type      tdb2:DatasetTDB2 ;
> tdb2:location "{DIR}" ;
> ##tdb2:unionDefaultGraph true ;
> .
>
> <#inferred_dataset> a ja:RDFDataset ;
>      ja:defaultGraph <#inference_model>
> .
>
> <#inference_model> a ja:InfModel ;
> ja:reasoner [ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner>] ;
>      ja:baseModel <#tdb_graph>
> .
>
> <#tdb_graph> a tdb2:GraphTDB  ;
> tdb2:dataset <#tdb_dataset_readwrite>  ;
>
>
> I am getting the following exception
>
> 21:16:19 INFO  Config          :: Template file: templates/config-tdb2-dir
> 21:16:20 ERROR Server          :: Exception in initialization: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
> 21:16:20 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@2c88a3e8{Apache Jena Fuseki Server,/,file:///C:/developer/graph/bin/apache-jena-fuseki-3.17.0/webapp/,UNAVAILABLE}
> org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74) ~[fuseki-server.jar:3.17.0]
>
> I could figure out what I am missing. Appreciate any help you can with this.
>
> Thank You
> Gowrisankar
>
--
Sorin Gheorghiu             Tel: +49 7531 88-3198
Universität Konstanz        Raum: B705
78464 Konstanz              sorin.gheorghiu@uni-konstanz.de

- KIM: Abteilung IT-Dienste Forschung und Lehre -


Re: Fuseki OWL Reasoner Configuration

Posted by Sorin Gheorghiu <so...@uni-konstanz.de>.
try with

<#tdb_graph> rdf:type tdb2:GraphTDB ;
     tdb2:dataset <#tdb_dataset_readwrite> ;


Am 27.12.2020 um 04:23 schrieb Gowrisankar Paramasivam:
> I am new to Apache Jena and Fuseki.
>
> I was able to run the docker version of Fuskei (jena-fuseki-docker-3.17.0 distribution) successfully. However, I am not that successful with being able to run Fuskei with any reasoner.  Appreciate any help you can
>
> In order to narrow down the problem, I am now running Fuseki in Standalone mode in Windows 10
>
>> fuseki-server --tdb2 --loc data -v --update /ds
> I modified the Template file (config-tdb2-dir) at ./run/templates/config-tdb2-dir
>
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> #
> 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 tdb2:    <http://jena.apache.org/2016/tdb#>
> PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
> #
> ## ---------------------------------------------------------------
> ## Updatable TDB2 dataset with all services enabled.
>
> <#service_tdb_all>
> rdf:type fuseki:Service ;
>      rdfs:label                         "TDB2 {NAME}" ;
>      fuseki:name                        "{NAME}" ;
>      fuseki:serviceQuery                "" ;
>      fuseki:serviceQuery                "sparql" ;
>      fuseki:serviceQuery                "query" ;
>      fuseki:serviceUpdate               "" ;
>      fuseki:serviceUpdate               "update" ;
>      fuseki:serviceUpload               "upload" ;
>      fuseki:serviceReadWriteGraphStore  "data" ;
>      fuseki:serviceReadGraphStore       "get" ;
> #    fuseki:dataset                     <#tdb_dataset_readwrite> ;
>      fuseki:dataset                     <#inferred_dataset> ;
>      .
>
> <#tdb_dataset_readwrite> rdf:type      tdb2:DatasetTDB2 ;
> tdb2:location "{DIR}" ;
> ##tdb2:unionDefaultGraph true ;
> .
>
> <#inferred_dataset> a ja:RDFDataset ;
>      ja:defaultGraph <#inference_model>
> .
>
> <#inference_model> a ja:InfModel ;
> ja:reasoner [ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner>] ;
>      ja:baseModel <#tdb_graph>
> .
>
> <#tdb_graph> a tdb2:GraphTDB  ;
> tdb2:dataset <#tdb_dataset_readwrite>  ;
>
>
> I am getting the following exception
>
> 21:16:19 INFO  Config          :: Template file: templates/config-tdb2-dir
> 21:16:20 ERROR Server          :: Exception in initialization: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
> 21:16:20 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@2c88a3e8{Apache Jena Fuseki Server,/,file:///C:/developer/graph/bin/apache-jena-fuseki-3.17.0/webapp/,UNAVAILABLE}
> org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74) ~[fuseki-server.jar:3.17.0]
>
> I could figure out what I am missing. Appreciate any help you can with this.
>
> Thank You
> Gowrisankar
>
-- 
Sorin Gheorghiu             Tel: +49 7531 88-3198
Universität Konstanz        Raum: B705
78464 Konstanz              sorin.gheorghiu@uni-konstanz.de

- KIM: Abteilung IT-Dienste Forschung und Lehre -


Re: Fuseki OWL Reasoner Configuration

Posted by Andy Seaborne <an...@apache.org>.
Hi there,

On 27/12/2020 03:23, Gowrisankar Paramasivam wrote:
> I am new to Apache Jena and Fuseki.
> 
> I was able to run the docker version of Fuskei (jena-fuseki-docker-3.17.0 distribution) successfully.

The docker version is Fuseki/main (no UI, and it does not use the 
template files) but the log output:

 > 
file:///C:/developer/graph/bin/apache-jena-fuseki-3.17.0/webapp/,UNAVAILABLE}

that seems to be Fuseki full - the webapp (war file or prepackaged with 
Jetty as the webapp server. That does use templates built into the binary.

Not sure what's happening here. The way to run with a custom 
configuration file is specifiy it on the command line ...

> However, I am not that successful with being able to run Fuskei with any reasoner.  Appreciate any help you can
> 
> In order to narrow down the problem, I am now running Fuseki in Standalone mode in Windows 10
> 
>> fuseki-server --tdb2 --loc data -v --update /ds

There is an example configuration file:

https://github.com/apache/jena/blob/master/jena-fuseki2/examples/config-inference-2.ttl

fuseki-server --conf MyInf.ttl

     Andy

I did try your modified template file in Fuseki full (not docker) and it 
seemed to worked for me. --conf is the better way to specific a 
configuration.

> 
> I modified the Template file (config-tdb2-dir) at ./run/templates/config-tdb2-dir
> 
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> #
> 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 tdb2:    <http://jena.apache.org/2016/tdb#>
> PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
> #
> ## ---------------------------------------------------------------
> ## Updatable TDB2 dataset with all services enabled.
> 
> <#service_tdb_all>
> rdf:type fuseki:Service ;
>      rdfs:label                         "TDB2 {NAME}" ;
>      fuseki:name                        "{NAME}" ;
>      fuseki:serviceQuery                "" ;
>      fuseki:serviceQuery                "sparql" ;
>      fuseki:serviceQuery                "query" ;
>      fuseki:serviceUpdate               "" ;
>      fuseki:serviceUpdate               "update" ;
>      fuseki:serviceUpload               "upload" ;
>      fuseki:serviceReadWriteGraphStore  "data" ;
>      fuseki:serviceReadGraphStore       "get" ;
> #    fuseki:dataset                     <#tdb_dataset_readwrite> ;
>      fuseki:dataset                     <#inferred_dataset> ;
>      .
> 
> <#tdb_dataset_readwrite> rdf:type      tdb2:DatasetTDB2 ;
> tdb2:location "{DIR}" ;
> ##tdb2:unionDefaultGraph true ;
> .
> 
> <#inferred_dataset> a ja:RDFDataset ;
>      ja:defaultGraph <#inference_model>
> .
> 
> <#inference_model> a ja:InfModel ;
> ja:reasoner [ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner>] ;
>      ja:baseModel <#tdb_graph>
> .
> 
> <#tdb_graph> a tdb2:GraphTDB  ;
> tdb2:dataset <#tdb_dataset_readwrite>  ;
> 
> 
> I am getting the following exception
> 
> 21:16:19 INFO  Config          :: Template file: templates/config-tdb2-dir
> 21:16:20 ERROR Server          :: Exception in initialization: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
> 21:16:20 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@2c88a3e8{Apache Jena Fuseki Server,/,file:///C:/developer/graph/bin/apache-jena-fuseki-3.17.0/webapp/,UNAVAILABLE}
> org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot find a most specific type for :tdb_graph, which has as possibilities: ja:Model tdb2:GraphTDB.
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93) ~[fuseki-server.jar:3.17.0]
>          at org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74) ~[fuseki-server.jar:3.17.0]
> 
> I could figure out what I am missing. Appreciate any help you can with this.
> 
> Thank You
> Gowrisankar
>