Galigator / openllet

Openllet is an OWL 2 reasoner in Java, build on top of Pellet.
https://www.w3.org/TR/owl2-primer/
Other
100 stars 26 forks source link

Openllet: UnsupportedClassVersionError #48

Closed RitaRandazzo01 closed 4 years ago

RitaRandazzo01 commented 4 years ago

Dear all, I try to get Openllet reasoner in my OWLAPI5 application. When I run it, it produces this Class Version Error: Exception in thread "main" java.lang.UnsupportedClassVersionError: openllet/owlapi/OpenlletReasonerFactory has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at OpenlletTest.main(OpenlletTest.java:25) Someone knows how can I fix it? My java version is 8. Thanks, Rita

ignazio1977 commented 4 years ago

Byte code version 54 is Java 10. I guess you're using Openllet 2.6.5. 2.6.4 should work with java 8.

RitaRandazzo01 commented 4 years ago

I tried to build Openllet 2.6.4 but I have this Exception: <<< FAILURE! - in openllet.pellet.owlapi.test.OWLWGTestCase runTestCase[51](openllet.pellet.owlapi.test.OWLWGTestCase) Time elapsed: 7.418 s <<< ERROR! openllet.atom.OpenError: WebOnt-description-logic-905 at openllet.pellet.owlapi.test.OWLWGTestCase.runTestCase(OWLWGTestCase.java:156) Caused by: org.semanticweb.owlapi.reasoner.TimeOutException: Timeout occurred while reasoning! at openllet.pellet.owlapi.test.OWLWGTestCase.runTestCase(OWLWGTestCase.java:147) I use Maven 3.6.3. I download Openllet from here https://github.com/Galigator/openllet/releases/tag/2.6.4 Do you know how to fix it? Thanks. Rita

Galigator commented 4 years ago

This is a know problem I don't know how to solve : https://github.com/Galigator/openllet/issues/20 There is two solution for you. 1 ) Try 'mvn clean install' until all tests pass; this error is due to an hash function that don't work on each run; so some run will pass. 2) mvn clean install -DskipTests=true , this do a compilation without tests.

ignazio1977 commented 4 years ago

If you're not making changes to the code, use 2.6.4 from Maven Central - that will skip the build altogether.