You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Humm, Bernhard, Prof. Dr." <be...@h-da.de> on 2020/03/10 10:45:19 UTC

Loading *.rules file to Fuseki server?

Hello,

 

I would like to load an ontology file *.ttl and a file containing Jena rules
*.rules to a Fuseki 3.10.0 server and perform interactive SPARQL queries on
http://localhost:3030/ 

Uploading the *.ttl file via the GUI and executing SPARQL queries on those
triples works fine.

Uploading the *.rules file via the GUI results in a parse error on the very
first character in the file (“@prefix …”)

Result: failed with message "Parse error: [line: 1, col: 1 ] Content ist
nicht zulässig in Prolog."

 

I then consulted this post:

 
<https://github.com/jfmunozf/Jena-Fuseki-Reasoner-Inference/wiki/Configuring
-Apache-Jena-Fuseki-2.4.1-inference-and-reasoning-support-using-SPARQL-1.1:-
Jena-inference-rules,-RDFS-Entailment-Regimes-and-OWL-reasoning>
https://github.com/jfmunozf/Jena-Fuseki-Reasoner-Inference/wiki/Configuring-
Apache-Jena-Fuseki-2.4.1-inference-and-reasoning-support-using-SPARQL-1.1:-J
ena-inference-rules,-RDFS-Entailment-Regimes-and-OWL-reasoning

I followed the instructions and added a configuration file, specifying both
*.ttl and *.rules file. 

 

:dataset         rdf:type ja:RDFDataset ;

rdfs:label "ArtOntology" ;

ja:defaultGraph

[ rdfs:label "ArtOntology" ;

a ja:InfModel ;

 

    #Reference to ontology file

    ja:content [ja:externalContent
<file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology_en.ttl> ] ;

 

    #Disable OWL-based reasoner

    #ja:reasoner [ja:reasonerURL
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>] ;

 

    #Disable RDFS-based reasoner

    #ja:reasoner [ja:reasonerURL
<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>] ;

 

    #Enable Jena Rules-based reasoner and we point the location of rules
file

    ja:reasoner [

        ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;

        ja:rulesFrom
<file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology.rules> ;


                                ] ; 

  ] ;

.

 

However, on Fuseki server startup, the files are not loaded and the
specified rules have no effect on SPARQL queries.

How to load the *.rules file to the Fuseki server?

 

Thank you for your help

 

           Bernhard 

 


AW: Loading *.rules file to Fuseki server?

Posted by "Humm, Bernhard, Prof. Dr." <be...@h-da.de>.
I start Fuseki with packaged fuseki-server.bat ("java -Xmx1200M -jar
fuseki-server.jar %*").
It definitely considers the config file in folder
C:\apache-jena-fuseki-3.10.0\run\configuration\. When I put some nonsense in
the config file I get an error at server startup.



-----Ursprüngliche Nachricht-----
Von: Lorenz Buehmann [mailto:buehmann@informatik.uni-leipzig.de] 
Gesendet: Dienstag, 10. März 2020 12:09
An: users@jena.apache.org
Betreff: Re: Loading *.rules file to Fuseki server?

Hi do you start Fuseki with the config file?


It should be

|fuseki-server --config=CONFIG_FILE_HERE|

On 10.03.20 11:45, Humm, Bernhard, Prof. Dr. wrote:
>
> Hello,
>
>  
>
> I would like to load an ontology file *.ttl and a file containing Jena 
> rules *.rules to a Fuseki 3.10.0 server and perform interactive SPARQL 
> queries on http://localhost:3030/
>
> Uploading the *.ttl file via the GUI and executing SPARQL queries on 
> those triples works fine.
>
> Uploading the *.rules file via the GUI results in a parse error on the 
> very first character in the file (“@prefix …”)
>
> Result: *failed* with message "Parse error: [line: 1, col: 1 ] Content 
> ist nicht zulässig in Prolog."
>
>  
>
> I then consulted this post:
>
> https://github.com/jfmunozf/Jena-Fuseki-Reasoner-Inference/wiki/Config
> uring-Apache-Jena-Fuseki-2.4.1-inference-and-reasoning-support-using-S
> PARQL-1.1:-Jena-inference-rules,-RDFS-Entailment-Regimes-and-OWL-reaso
> ning
>
> I followed the instructions and added a configuration file, specifying 
> both *.ttl and *.rules file.
>
>  
>
> :dataset         rdf:type ja:RDFDataset ;
>
> rdfs:label "ArtOntology" ;
>
> ja:defaultGraph
>
> [ rdfs:label "ArtOntology" ;
>
> a ja:InfModel ;
>
>  
>
>     #Reference to ontology file
>
>     ja:content [ja:externalContent
> <file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology_en.ttl
> >
> ] ;
>
>  
>
>     #Disable OWL-based reasoner
>
>     #ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>] ;
>
>  
>
>     #Disable RDFS-based reasoner
>
>     #ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>] ;
>
>  
>
>     #Enable Jena Rules-based reasoner and we point the location of 
> rules file
>
>     ja:reasoner [
>
>         ja:reasonerURL 
> <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
>
>         ja:rulesFrom
> <file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology.rules>
> ;
>
>                                 ] ;
>
>   ] ;
>
> .
>
>  
>
> However, on Fuseki server startup, the files are not loaded and the 
> specified rules have no effect on SPARQL queries.
>
> How to load the *.rules file to the Fuseki server?
>
>  
>
> Thank you for your help
>
>  
>
>            Bernhard
>
>  
>

Re: Loading *.rules file to Fuseki server?

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
Hi do you start Fuseki with the config file?


It should be

|fuseki-server --config=CONFIG_FILE_HERE|

On 10.03.20 11:45, Humm, Bernhard, Prof. Dr. wrote:
>
> Hello,
>
>  
>
> I would like to load an ontology file *.ttl and a file containing Jena
> rules *.rules to a Fuseki 3.10.0 server and perform interactive SPARQL
> queries on http://localhost:3030/
>
> Uploading the *.ttl file via the GUI and executing SPARQL queries on
> those triples works fine.
>
> Uploading the *.rules file via the GUI results in a parse error on the
> very first character in the file (“@prefix …”)
>
> Result: *failed* with message "Parse error: [line: 1, col: 1 ] Content
> ist nicht zulässig in Prolog."
>
>  
>
> I then consulted this post:
>
> https://github.com/jfmunozf/Jena-Fuseki-Reasoner-Inference/wiki/Configuring-Apache-Jena-Fuseki-2.4.1-inference-and-reasoning-support-using-SPARQL-1.1:-Jena-inference-rules,-RDFS-Entailment-Regimes-and-OWL-reasoning
>
> I followed the instructions and added a configuration file, specifying
> both *.ttl and *.rules file.
>
>  
>
> :dataset         rdf:type ja:RDFDataset ;
>
> rdfs:label "ArtOntology" ;
>
> ja:defaultGraph
>
> [ rdfs:label "ArtOntology" ;
>
> a ja:InfModel ;
>
>  
>
>     #Reference to ontology file
>
>     ja:content [ja:externalContent
> <file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology_en.ttl>
> ] ;
>
>  
>
>     #Disable OWL-based reasoner
>
>     #ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>] ;
>
>  
>
>     #Disable RDFS-based reasoner
>
>     #ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>] ;
>
>  
>
>     #Enable Jena Rules-based reasoner and we point the location of
> rules file
>
>     ja:reasoner [
>
>         ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
>
>         ja:rulesFrom
> <file:///C:/apache-jena-fuseki-3.10.0/run/databases/ArtOntology.rules>
> ;      
>
>                                 ] ;
>
>   ] ;
>
> .
>
>  
>
> However, on Fuseki server startup, the files are not loaded and the
> specified rules have no effect on SPARQL queries.
>
> How to load the *.rules file to the Fuseki server?
>
>  
>
> Thank you for your help
>
>  
>
>            Bernhard
>
>  
>