I want to use pellet reasoner with my Fuseki 2.3.1
First: I added Pellet reasoner to my config.ttl as this:
ja:reasoner
[ ja:reasonerClass
Solution:
Use openllet instead.
Just change to ja:reasonerClass "openllet.jena.PelletReasonerFactory"
in the config file, and download the openllet distribution and other jar files needed to the classpath.
Explanation:The error
expected class org.apache.jena.reasoner.ReasonerFactory, but had class org.mindswap.pellet.jena.PelletReasonerFactory
is caused by that the pellet's org.mindswap.pellet.jena.PelletReasonerFactory
implements the old interface (com.hp.hpl.jena.reasoner.ReasonerFactory
) which is different from the interface used in Fuseki (org.apache.jena.reasoner.ReasonerFactory
).
The openllet's openllet.jena.PelletReasonerFactory
implements the correct interface (org.apache.jena.reasoner.ReasonerFactory
).
Check their source code:
openllet's PelletReasonerFactory.java
pellet's PelletReasonerFactory.java