Clerezza uses the java.util.ServiceLoader functionality to enable to use of
Clerezza outside of an OSGI environment.
I've observed that, possible reason why I've only been facing trouble
with Jena and not with Clerezza so far.
IMO, supporting non-OSGi environments outside of 1) and 2) is out of
scope for Stanbol, that would distract us from our primary goal. You'd
need to provide lifecycle, service registry, ConfigurationAdmin and a
number of other things that probably forget, that's a lot of work that
doesn't help fulfilling our own goals.
Yeah, but it looks like having option (1) with Java-only API, as part of
the classpath of some external program using Stanbol, could suffice.
Do you plan to use all of Stanbol (along with the HTTP / JAX-RS
endpoints) or just a restricted subset of the lowlevel components?
We (and the adopters) would be happy to even just use its Java API to
begin with.
It's hard to tell how to best solve this without the rest of the stacktrace.
Here it is, if it helps. It really looks like a working dir problem with
Jena resources tho'
----------------
03.05.2011 18:06:36.526 *ERROR* [main]
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.CoreOntologySpaceImpl
KReS :: [NONFATAL] An error occurred while storing root ontology
Ontology(<http://www.iks-project.eu/scope/TestScope/core/root.owl>
[Axioms: 0] [Logical axioms: 0]) . Ontology management will be volatile!
com.hp.hpl.jena.reasoner.ReasonerException: Can't load rules file:
etc/rdfs-fb-tgc-noresource.rules
at
com.hp.hpl.jena.reasoner.rulesys.FBRuleReasoner.loadRules(FBRuleReasoner.java:259)
at
com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasoner.loadRulesLevel(RDFSRuleReasoner.java:197)
at
com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasoner.<init>(RDFSRuleReasoner.java:69)
at
com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasoner.<init>(RDFSRuleReasoner.java:81)
at
com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasonerFactory.create(RDFSRuleReasonerFactory.java:46)
at
com.hp.hpl.jena.ontology.OntModelSpec.getReasoner(OntModelSpec.java:382)
at
com.hp.hpl.jena.ontology.impl.OntModelImpl.generateGraph(OntModelImpl.java:2742)
at
com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:139)
at
com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:120)
at
com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:402)
at
com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:361)
at
com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:344)
at
org.apache.stanbol.owl.trasformation.JenaToOwlConvert.ModelOwlToJenaConvert(JenaToOwlConvert.java:196)
at
org.apache.stanbol.ontologymanager.ontonet.impl.io.ClerezzaOntologyStorage.store(ClerezzaOntologyStorage.java:179)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.AbstractOntologySpaceImpl.setTopOntology(AbstractOntologySpaceImpl.java:490)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologySpaceFactoryImpl.setupSpace(OntologySpaceFactoryImpl.java:88)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologySpaceFactoryImpl.createCoreOntologySpace(OntologySpaceFactoryImpl.java:52)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologyScopeImpl.<init>(OntologyScopeImpl.java:71)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologyScopeFactoryImpl.createOntologyScope(OntologyScopeFactoryImpl.java:61)
at
org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologyScopeFactoryImpl.createOntologyScope(OntologyScopeFactoryImpl.java:48)
at it.cnr.istc.stlab.stanboltests.SetupKres.main(SetupKres.java:24)
Caused by: java.io.FileNotFoundException:
etc/rdfs-fb-tgc-noresource.rules (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
com.hp.hpl.jena.util.FileUtils.openResourceFileAsStream(FileUtils.java:397)
at com.hp.hpl.jena.util.FileUtils.openResourceFile(FileUtils.java:375)
at
com.hp.hpl.jena.reasoner.rulesys.Util.loadRuleParserFromResourceFile(Util.java:221)
at
com.hp.hpl.jena.reasoner.rulesys.FBRuleReasoner.loadRules(FBRuleReasoner.java:257)
... 20 more