[英]NoSuchMethodError while creating HermiT instance
I'm trying to create an instance of HermiT reasoner, but the console continue to show the exception "noSuchMethodError". 我正在尝试创建HermiT推理程序的实例,但是控制台继续显示异常“ noSuchMethodError”。
In particular this is the error from the java console: 特别是来自Java控制台的错误:
Caused by: java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLOntologyID.getDefaultDocumentIRI()Ljava/util/Optional;
at org.semanticweb.HermiT.structural.OWLClausification.preprocessAndClausify(OWLClausification.java:77)
at org.semanticweb.HermiT.Reasoner.loadOntology(Reasoner.java:214)
at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:205)
at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:179)
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 org.processmining.plugins.myminer.knowledge.OWLOntologia.retrieve_property_class(OWLOntologia.java:76)
at org.processmining.plugins.myminer.knowledge.OntologyVisualizer.visualize(OntologyVisualizer.java:39)
... 13 more
I already imported all the dependencies needed by HermiT (version 1.4.3.517) and that's the line where the ReasonerFactory
is created: 我已经导入了HermiT(版本1.4.3.517)所需的所有依赖关系,这就是创建ReasonerFactory
的行:
OWLReasonerFactory reasonerFactory = new ReasonerFactory();
The wrong line is: 错误的行是:
OWLReasoner hermit = reasonerFactory.createReasoner(ontology);
as the console said. 如控制台所说。
I don't understand why the instance can't be created and why the Exception is thrown. 我不明白为什么无法创建实例以及为什么引发异常。
我决定将其更新为owl-api和hermit的最新版本,这些版本是使用maven中央存储库找到的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.