On 11/10/13 09:25, Alexei Golovko wrote:
2013/10/11 Andy Seaborne <[email protected]>
On 10/10/13 07:25, Alexei Golovko wrote:
Could not enable pellet reasoner.
If I use approach from the quoted thread, I see:
Error 500: tried to access field
com.hp.hpl.jena.reasoner.**BaseInfGraph.isPrepared from class
org.mindswap.pellet.jena.**PelletInfGraph
...
Now fuseki starts, the only remaining problem is 500 error, same as above.
Is the version of Pellet you are using compatible with the version of
Jena in the Fuseki you have? (it looks like it is not) This is a
question for the Pellet mailing list.
Andy
Andy
2013/10/7 Alexei Golovko <[email protected]>
Thank you, I will try Pellet. (Actually, this was already in my plans,
but
section of Pellet documentation about using with Jena is so short. Though
there seems to exist configuration example in
http://mail-archives.apache.**org/mod_mbox/jena-users/**
201106.mbox/%3CDDD95E03-9BB4-**423A-8FB6-A1DEE8E2EA97@gmx.**net%3E<http://mail-archives.apache.org/mod_mbox/jena-users/201106.mbox/%[email protected]%3E>
.)
I use fuseki-1.0.0, pellet-2.3.1.
echo ${JARS}
/home/i/jena-fuseki-1.0.0/**fuseki-server.jar:/home/i/**
pellet-2.3.1/lib/aterm-java-1.**6.jar:/home/i/pellet-2.3.1/**
lib/pellet-cli.jar:/home/i/**pellet-2.3.1/lib/pellet-core.**
jar:/home/i/pellet-2.3.1/lib/**pellet-datatypes.jar:/home/i/**
pellet-2.3.1/lib/pellet-el.**jar:/home/i/pellet-2.3.1/lib/**
pellet-explanation.jar:/home/**i/pellet-2.3.1/lib/pellet-**
jena.jar:/home/i/pellet-2.3.1/**lib/pellet-modularity.jar:/**
home/i/pellet-2.3.1/lib/**pellet-owlapiv3.jar:/home/i/**
pellet-2.3.1/lib/pellet-**pellint.jar:/home/i/pellet-2.**
3.1/lib/pellet-query.jar:/**home/i/pellet-2.3.1/lib/**
pellet-rules.jar:/home/i/**pellet-2.3.1/lib/pellet-test.**jar
pellet-ex.ttl (used as --desc=pellet-ex.ttl):
@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#>>
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#inf_graph> ;
.
<#inf_graph> rdf:type ja:InfModel ;
ja:reasoner [ja:reasonerClass
"org.mindswap.pellet.jena.**PelletReasonerFactory" ;
] ;
ja:baseModel <#baseGraph>
.
<#baseGraph> a ja:MemoryModel ;
ja:content [ja:externalContent
<file:///home/i/jena-fuseki-1.**0.0/Data/books.ttl>]
.
pellet.ttl (used as config):
# Licensed under the terms of http://www.apache.org/**
licenses/LICENSE-2.0 <http://www.apache.org/licenses/LICENSE-2.0>
@prefix : <#> .
@prefix fuseki:
<http://jena.apache.org/**fuseki#<http://jena.apache.org/fuseki#>>
.
@prefix rdf:
<http://www.w3.org/1999/02/22-**rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
.
@prefix owl:
<http://www.w3.org/2002/07/**owl#<http://www.w3.org/2002/07/owl#>>
.
@prefix rdfs:
<http://www.w3.org/2000/01/**rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
.
@prefix tdb:
<http://jena.hpl.hp.com/2008/**tdb#<http://jena.hpl.hp.com/2008/tdb#>>
.
@prefix ja:
<http://jena.hpl.hp.com/2005/**11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
.
[] rdf:type fuseki:Server ;
ja:context [ ja:cxtName "arq:outputGraphBNodeLabels" ; ja:cxtValue
"true" ] ;
fuseki:services (
<#service1>
) .
# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
# TDB
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
## ------------------------------**------------------------------**---
## Service with only SPARQL query on an inference model.
## Inference model bbase data in TDB.
<#service1> rdf:type fuseki:Service ;
fuseki:name "inf" ; # http://host/inf
fuseki:serviceQuery "sparql" ; # SPARQL query service
fuseki:serviceUpdate "update" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> ;
.
<#model_inf> a ja:InfModel ;
###ja:baseModel <#tdbGraph> ;
#ja:baseModel <#memGraph> ; ##
ja:reasoner <#myReasoner> . <#myReasoner> #[
#ja:reasonerURL <http://jena.hpl.hp.com/2003/**
OWLFBRuleReasoner <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>>
ja:reasoner [ja:reasonerClass
"org.mindswap.pellet.jena.**PelletReasonerFactory"];
rdf:type ja:ReasonerFactory;
#rdf:type [owl:complementOf ja:InfModel]
. #] .
###<#tdbDataset> rdf:type tdb:DatasetTDB ;
### tdb:location "DB" ;
# If the unionDefaultGraph is used, then the "update" service should
be
removed.
# The unionDefaultGraph is read only.
# tdb:unionDefaultGraph true ;
### .
###<#tdbGraph> rdf:type tdb:GraphTDB ;
### tdb:dataset <#tdbDataset> .
##
<#memGraph> a ja:MemoryModel .