i use https://www.jarfire.org/pellet.html
to run an example, got error
java.lang.ClassCastException: com.hp.hpl.jena.reasoner.rulesys.FBRuleInfGraph cannot be cast to org.mindswap.pellet.jena.PelletInfGraph at tutorial.HelloWorld.main(HelloWorld.java:178)
Model schema = FileManager.get().loadModel("C:/Users/vincent/Downloads/owlDemoSchema.owl");
Model data = FileManager.get().loadModel("C:/Users/vincent/Downloads/owlDemoData.rdf");
System.out.println("creating OntModel ");
OntModel Infmodel = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC, schema);
//dataset.getNamedModel(this.URL));
// create an inferencing model using Pellet reasoner
//InfModel model = ModelFactory.createInfModel(r, schema);
Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
InfModel model = ModelFactory.createInfModel(reasoner, data);
// get the underlying Pellet graph
PelletInfGraph pellet = (PelletInfGraph) model.getGraph();
// check for inconsistency
boolean consistent = pellet.isConsistent();
if(consistent == true)
System.out.println("consistent");
else
System.out.println("not consistent");