简体   繁体   English

创建HermiT实例时出现NoSuchMethodError

[英]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.

相关问题 OWLApi:无法创建隐士推理机实例 - OWLApi: Failed to create a hermit reasoner instance OWLAPI:创建(HermiT)推理器后修改本体 - OWLAPI: modify ontology after creating (HermiT) reasoner 在java中创建FirefoxDriver时出现java.lang.NoSuchMethodError - java.lang.NoSuchMethodError while creating a FirefoxDriver in java 为什么 Glassfish 服务器在使用 ZoneId 创建 java.time.LocalDate 的实例时抛出 NoSuchMethodError - why Glassfish server throws NoSuchMethodError when creating an instance of java.time.LocalDate with ZoneId java.lang.NoSuchMethodError 在创建子 class 的实例时出现异常,该实例在 VSCode Linux - java.lang.NoSuchMethodError exception when creating an instance of child class having a constructor on VSCode Linux Junit:创建BOFactory实例时出现异常 - Junit : Exception while creating BOFactory instance 创建新实例SQLITE时出错 - Getting an error while creating new instance SQLITE 程序在创建数组新实例时冻结 - Program Freezes while creating new instance of array ElasticSearchTestCase:使用ESIntegTestCase创建客户端实例时 - ElasticSearchTestCase : while Creating client instance using ESIntegTestCase 创建Web服务客户端时出现NoSuchMethodError - NoSuchMethodError on creating a web service client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM