Hi There are several issues 1) judging by the stack trace, the code you are using is not Jena, but OWLAPI, so the issue does not apply to Jena, wrong addressing. You can try to ask in https://github.com/owlcs/owlapi, or in SO, or maybe here https://github.com/owlcs/hermit-reasoner (if you are using this version of Hermit). I think the best choice is SO (https://stackoverflow.com/). 2) the error indicates that the problem is with dependencies, i.e. does not directly apply to OWLAPI or Jena 3) ancient version of OWLAPI (probably because of ancient Hermit) 4) if you really want to use OWLAPI-based Hermit together with Jena, you can look at owlcs/ONTAPI.
On Fri, Sep 13, 2024 at 4:48 PM Zlatareva, Neli (Computer Science) <zlatar...@ccsu.edu.invalid> wrote: > Hi there, I am wondering if anybody was successful integrating HermitT in > Jena. I tried everything I was able to find, including ChatGPT > recommendations 🙂, but nothing helped me overcome the following error > after correctly creating and loading the ontology > > Exception in thread "main" java.lang.NoSuchMethodError: > 'com.google.common.base.Optional > org.semanticweb.owlapi.model.OWLOntologyID.getDefaultDocumentIRI()' > at > org.semanticweb.HermiT.structural.OWLClausification.preprocessAndClausify(OWLClausification.java:147) > at org.semanticweb.HermiT.Reasoner.loadOntology(Reasoner.java:211) > at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:202) > at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:176) > at > org.semanticweb.HermiT.ReasonerFactory.createHermiTOWLReasoner(ReasonerFactory.java:51) > at > org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:19) > at > org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:15) > at HermitExample.main(HermitExample.java:44) > > Any help will be greatly appreciated. > Thank you so much. > Regards, Neli. > > Neli P. Zlatareva, PhD > Professor of Computer Science > Department of Computer Science > Central Connecticut State University > New Britain, CT 06050 > Phone: (860) 832-2723 > Fax: (860) 832-2712 > Web site: cs.ccsu.edu/~neli/ >