Error with OWL API 5.1.0 and 5.1.10
I am using the version of factplusplus on the main branch (i.e. 1.7-SNAPSHOT). I am getting error with the version of OWL API 5.1.0 and 5.1.10
Error with OWL API 5.1.10
Exception in thread "main" java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom.getProperty()Lorg/semanticweb/owlapi/model/OWLPropertyExpression;
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner$AxiomTranslator.visit(FaCTPlusPlusReasoner.java:1676)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner$AxiomTranslator.visit(FaCTPlusPlusReasoner.java:1573)
at org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom.accept(OWLObjectPropertyDomainAxiom.java:51)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner.loadAxiom(FaCTPlusPlusReasoner.java:446)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner.loadReasonerAxioms(FaCTPlusPlusReasoner.java:498)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasoner.<init>(FaCTPlusPlusReasoner.java:434)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasonerFactory.createReasoner(FaCTPlusPlusReasonerFactory.java:64)
at uk.ac.manchester.cs.factplusplus.owlapiv3.FaCTPlusPlusReasonerFactory.createReasoner(FaCTPlusPlusReasonerFactory.java:72)
at ontology.Ontology.getReasoner(Ontology.java:346)
at ontology.Ontology.<init>(Ontology.java:87)
at ontology.OntologyUtils.saveOntologyToDatabase(OntologyUtils.java:666)
at examples.ThingGetOntologies.loadOntologiesLocal(ThingGetOntologies.java:144)
at examples.ThingGetOntologies.main(ThingGetOntologies.java:44)
Error with OWL API 5.1.0
Aug 20, 2019 4:35:10 PM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.NoSuchMethodException: uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.<init>()
org.semanticweb.owlapi.model.OWLRuntimeException: Injection failed for interface org.semanticweb.owlapi.model.OWLOntologyFactory
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.loadInstancesFromServiceLoader(OWLAPIServiceLoaderModule.java:62)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.configure(OWLAPIServiceLoaderModule.java:49)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.semanticweb.owlapi.apibinding.OWLManager.createInjector(OWLManager.java:104)
at org.semanticweb.owlapi.apibinding.OWLManager.createOWLOntologyManager(OWLManager.java:44)
at ontology.OntologyUtils.<clinit>(OntologyUtils.java:56)
at examples.ThingGetOntologies.loadOntologiesLocal(ThingGetOntologies.java:144)
at examples.ThingGetOntologies.main(ThingGetOntologies.java:44)
Caused by: java.util.ServiceConfigurationError: org.semanticweb.owlapi.model.OWLOntologyFactory: Provider uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at java.lang.Iterable.forEach(Iterable.java:74)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.load(OWLAPIServiceLoaderModule.java:86)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.loadInstancesFromServiceLoader(OWLAPIServiceLoaderModule.java:60)
... 14 more
Caused by: java.lang.InstantiationException: uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl
at java.lang.Class.newInstance(Class.java:427)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 19 more
Caused by: java.lang.NoSuchMethodException: uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 20 more
Exception in thread "main" java.lang.ExceptionInInitializerError
at examples.ThingGetOntologies.loadOntologiesLocal(ThingGetOntologies.java:144)
at examples.ThingGetOntologies.main(ThingGetOntologies.java:44)
Caused by: com.google.inject.CreationException: Unable to create injector, see the following errors:
No implementation for java.util.Set<org.semanticweb.owlapi.io.OWLParserFactory> was bound.
while locating java.util.Set<org.semanticweb.owlapi.io.OWLParserFactory>
for the 1st parameter of uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyParsers(OWLOntologyManagerImpl.java:1426)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyParsers(OWLOntologyManagerImpl.java:1426)
at uk.ac.manchester.cs.owl.owlapi.OWLAPIImplModule.configure(Unknown Source)
No implementation for java.util.Set<org.semanticweb.owlapi.model.OWLOntologyIRIMapper> was bound.
while locating java.util.Set<org.semanticweb.owlapi.model.OWLOntologyIRIMapper>
for the 1st parameter of uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setIRIMappers(OWLOntologyManagerImpl.java:1377)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setIRIMappers(OWLOntologyManagerImpl.java:1377)
at uk.ac.manchester.cs.owl.owlapi.OWLAPIImplModule.configure(Unknown Source)
No implementation for java.util.Set<org.semanticweb.owlapi.model.OWLStorerFactory> was bound.
while locating java.util.Set<org.semanticweb.owlapi.model.OWLStorerFactory>
for the 1st parameter of uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyStorers(OWLOntologyManagerImpl.java:1364)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyStorers(OWLOntologyManagerImpl.java:1364)
at uk.ac.manchester.cs.owl.owlapi.OWLAPIImplModule.configure(Unknown Source)
An exception was caught and reported. Message: Injection failed for interface org.semanticweb.owlapi.model.OWLOntologyFactory
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.configure(Unknown Source)
4 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.semanticweb.owlapi.apibinding.OWLManager.createInjector(OWLManager.java:104)
at org.semanticweb.owlapi.apibinding.OWLManager.createOWLOntologyManager(OWLManager.java:44)
at ontology.OntologyUtils.<clinit>(OntologyUtils.java:56)
... 2 more
Caused by: org.semanticweb.owlapi.model.OWLRuntimeException: Injection failed for interface org.semanticweb.owlapi.model.OWLOntologyFactory
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.loadInstancesFromServiceLoader(OWLAPIServiceLoaderModule.java:62)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.configure(OWLAPIServiceLoaderModule.java:49)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
... 8 more
Caused by: java.util.ServiceConfigurationError: org.semanticweb.owlapi.model.OWLOntologyFactory: Provider uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at java.lang.Iterable.forEach(Iterable.java:74)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.load(OWLAPIServiceLoaderModule.java:86)
at org.semanticweb.owlapi.OWLAPIServiceLoaderModule.loadInstancesFromServiceLoader(OWLAPIServiceLoaderModule.java:60)
... 14 more
Caused by: java.lang.InstantiationException: uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl
at java.lang.Class.newInstance(Class.java:427)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 19 more
Caused by: java.lang.NoSuchMethodException: uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 20 more
Hi @Mohammad Noorani Bakerally , were you able to resolve that issue?