Fuseki how to add Pellet reasoner

主宰稳场 提交于 2019-11-29 12:41:47

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?

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!