Search code examples
javaowlontologyowl-api

OWLOntologyStorer exception when creating an Ontology


I get this exception:

Exception in thread "main" java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLOntologyManager.addOntologyStorer(Lorg/semanticweb/owlapi/model/OWLOntologyStorer;)V

when I try to create an Ontology using the following line of code:

owlmanager = OWLManager.createOWLOntologyManager();

Solution

  • The most likely explanation is that you have multiple OWLAPI versions on your classpath. This looks like OWLAPI 4 and OWLAPI 3 conflicts.