Git Product home page Git Product logo

Comments (12)

ignazio1977 avatar ignazio1977 commented on June 14, 2024 1

The current SWRLAPI is not compatible with OWLAPI 5. I'll put up a forked repo with the required changes.

from openllet.

Galigator avatar Galigator commented on June 14, 2024

Hello,
to help you I need a little more informations. What version of Openllet are you using ? what version of Java (javac) are you using ? Do you use maven/gradle ?

from openllet.

rayaprolu143 avatar rayaprolu143 commented on June 14, 2024

Hi,
Thank you for replying. I use maven to install dependencies, version of javac is 1.8.0_151, and finally, the version of Openllet is 2.6.3

from openllet.

Galigator avatar Galigator commented on June 14, 2024

Strange. "java/util/stream/Stream" is a Java8 class, not an inner openllet/owl-api class.
How do you execute your code ? Are you sure the execution also use a Java8+ ?

from openllet.

ignazio1977 avatar ignazio1977 commented on June 14, 2024

It is a classpath problem. You have an incompatible version of OWLAPI in the classpath, one that predates 5.0.0.

from openllet.

Galigator avatar Galigator commented on June 14, 2024

Ignazio is right, the maven dependency tree show the owlapi-osgidistribution-4.2.8 in the resolved dependencies. It come from swrlapi-2.0.4 . This owlapi-osgidistribution doesn't not conflict with other artifcate because it is the only one to include it; so maven doesn't overwrite the version.

Here you have multiples solutions :

  1. Force include a recent version of owlapi-osgidistribution-5.X.X ; it may create failure in swrlapi.
  2. Upgrade swrlapi to a version that is using owlapi version 5.X.X

from openllet.

rayaprolu143 avatar rayaprolu143 commented on June 14, 2024

Although, the previous error vanished it did fail in running SWRL API. Now, I understood where the problem exists, I will try to rectify it by myself or else post the issue separately.

from openllet.

ignazio1977 avatar ignazio1977 commented on June 14, 2024

https://github.com/ignazio1977/swrlapi can be checked out and built locally to get SWRLAPI compatible with Openllet and OWLAPI 5. I can't provide a Maven release for this - it would conflict with the Protege provided one, in the long term.

from openllet.

rayaprolu143 avatar rayaprolu143 commented on June 14, 2024

Thank you.

from openllet.

rayaprolu143 avatar rayaprolu143 commented on June 14, 2024

I am presented with the following error:

Exception in thread "main" org.swrlapi.exceptions.SWRLRuleEngineException: Error creating rule engine Drools. Exception: java.lang.NoSuchMethodError. Message: org.semanticweb.owlapi.model.OWLDocumentFormat.isPrefixOWLOntologyFormat()Z
at org.swrlapi.factory.DefaultSWRLRuleAndQueryEngineFactory.createSWRLRuleEngine(DefaultSWRLRuleAndQueryEngineFactory.java:71)
at org.swrlapi.factory.DefaultSWRLRuleAndQueryEngineFactory.createSWRLRuleEngine(DefaultSWRLRuleAndQueryEngineFactory.java:41)
at org.swrlapi.factory.SWRLAPIFactory.createSWRLRuleEngine(SWRLAPIFactory.java:38)
at SWRLrules.main(SWRLrules.java:57)
Caused by: java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLDocumentFormat.isPrefixOWLOntologyFormat()Z
at org.swrlapi.factory.DefaultIRIResolver.updatePrefixes(DefaultIRIResolver.java:165)
at org.swrlapi.factory.DefaultSWRLAPIOWLOntology.(DefaultSWRLAPIOWLOntology.java:163)
at org.swrlapi.factory.SWRLAPIInternalFactory.createSWRLAPIOntology(SWRLAPIInternalFactory.java:266)
at org.swrlapi.factory.DefaultSWRLRuleAndQueryEngineFactory.createSWRLRuleEngine(DefaultSWRLRuleAndQueryEngineFactory.java:53)
... 3 more

I did load the swrl module into the libraries in intellij. I am attaching the screen shot of the libraries in the project, just in case it would be easy for you to verify whether I loaded the modules correctly.
screenshot from 2018-02-27 14-27-58

from openllet.

ignazio1977 avatar ignazio1977 commented on June 14, 2024

You have swrlapi 2.0.5 still in the classpath. Needs to go and be replaced with the fresh build. Make sure you change the swrlapi version to something different, to ensure intellij cannot get confused.

from openllet.

rayaprolu143 avatar rayaprolu143 commented on June 14, 2024

Hi Ignazio,
I understood where I made the mistake, I removed the maven dependencies for both the swrl api and drools engine and built locally both the dependencies by downloading zip files and used 'mvn install clean' and 'mvn package' and imported them into the project.

from openllet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.