我正在使用使用OWL API 4.1.3的日志映射,并在编译时出现以下错误:
Exception in thread "main" java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLOntologyID.getOntologyIRI()Lcom/google/common/base/Optional;
at uk.ac.ox.krr.logmap2.OntologyLoader.setOWLOntology(OntologyLoader.java:150)
at uk.ac.ox.krr.logmap2.OntologyLoader.<init>(OntologyLoader.java:113)
at uk.ac.ox.krr.logmap2.overlapping.LexicalOverlappingExtractor.createOverlapping(LexicalOverlappingExtractor.java:156)
at uk.ac.ox.krr.logmap2.overlapping.LexicalOverlappingExtractor.createOverlapping(LexicalOverlappingExtractor.java:131)
at uk.ac.ox.krr.logmap2.LogMap2Core.OverlappingEstimation(LogMap2Core.java:873)
at uk.ac.ox.krr.logmap2.LogMap2Core.<init>(LogMap2Core.java:293)
at uk.ac.ox.krr.logmap2.LogMap2Core.<init>(LogMap2Core.java:240)
at uk.ac.ox.krr.logmap2.LogMap2_Matcher.<init>(LogMap2_Matcher.java:145)
at Alignment.LogMap.LogMapAligner.getAlignment(LogMapAligner.java:40)
at Main.main(Main.java:50)
答案 0 :(得分:1)
您的类路径上有多个OWLAPI版本。确保只有一个,并且该版本与您正在使用的所有库兼容。