Fuseki how to add Pellet reasoner

前端 未结 2 908
天命终不由人
天命终不由人 2020-12-20 06:51

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
           


        
相关标签:
2条回答
  • 2020-12-20 07:16

    The error you have is

    expected class org.apache.jena.reasoner.ReasonerFactory, but had class org.mindswap.pellet.jena.PelletReasonerFactory

    I'm no expert but it looks like the Pellet factory for Jena currently in your classpath does not match the expected class.

    Which version of Jena comes with Fuseki, and which version is currently used by Pellet?

    0 讨论(0)
  • 2020-12-20 07:23

    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

    0 讨论(0)
提交回复
热议问题