I have an Ontology which have some SWRL rules (created using Protege). I am using OWL API to manipulate the ontology and using JENA API for SPARQL Queries. I need to reason this ontology using Pellet (As pellet supports SWRL and i have sed the reasoner inside protege). I saw some examples at https://github.com/ignazio1977/pellet/blob/master/examples/src/main/java/org/mindswap/pellet/examples/OWLAPIi am using the following dependency
<dependency>
<groupId>com.github.ansell.pellet</groupId>
<artifactId>pellet-owlapiv3</artifactId>
<version>2.3.6-ansell</version>
</dependency>
The code is as follows
OWLOntologyManager man = OWLManager.createOWLOntologyManager();
File file = new File("C:\\Protege-5.5.0\\ContextModellingJAVA.owl");
// Loading an Ontology from file
OWLOntology o = man.loadOntologyFromOntologyDocument(file);
PelletReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner(o);
System.out.println("done.");
When I run this I am getting the following error
Exception in thread "main" java.lang.NoSuchMethodError: 'org.semanticweb.owlapi.model.OWLPropertyExpression org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom.getProperty()'
at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:945)
at org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom.accept(OWLObjectPropertyDomainAxiom.java:36)
at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:699)
at org.semanticweb.owlapi.model.OWLOntology.accept(OWLOntology.java:519)
at com.clarkparsia.pellet.owlapiv3.PelletReasoner.refresh(PelletReasoner.java:967)
at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:345)
at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:304)
at com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.createReasoner(PelletReasonerFactory.java:71)
at ContextModelling.main(ContextModelling.java:166)
Can anyone please help me solve the error. Thanks in advace