Error when running sync_reasoner_pellet

classic Classic list List threaded Threaded
8 messages Options
Oli
Reply | Threaded
Open this post in threaded view
|

Error when running sync_reasoner_pellet

Oli
Hey hey,

I would like to thank you Jiba for your work and for adding the capability to infer property values :)

I'm trying to use the sync_reasoner_pellet(infer_property_values=True) but I get some errors that I don't know how to solve.

Here is my code:
____

    import owlready2 as owl
    owl.JAVA_EXE = r"C:\Program Files\Java\jdk-10\bin\java.exe"
    onto = owl.get_ontology("file://" +
                   "D:\\GitRepository\\production-modeling-tool\\mamot\\tests\\data\\stations.owl").load()
    with onto:
        owl.sync_reasoner_pellet(x=onto, infer_property_values=True)
____

And in the txt file you can find a copy paste of the errors that I get (quite long):
error_sync_reasoner.txt

Thanks in advance for taking the time to reply :)
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Jiba
Administrator
Hi,

The error message means that Pellet crashed, but it does not display the Pellet error message.

Could you send me your ontology, so as I can debug this problem, or give me the Pellet error message (you can obtain it by running Pellet manually on you ontology, in a terminal).

Jiba
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Oli
Hi Jiba,

Thanks for the reply. Here you have the ontology: stations.owl

Cheers,
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Jiba
Administrator
Hi,

I tried on your ontology but I get no error. I suspect the problem is related to your java installation (maybe java is too old or too new?).

In the development version of Owlready, I've added the Java error message to the python one, so we can see the exact problem. Could you try with this version please?

Jiba
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Oli
Hi,

Thanks you so much for the help. I have tried the new version, and the error I get is the following:

owlready2.base.OwlReadyJavaError: Java error message is:
E         [main] WARN org.apache.jena.riot.RDFLanguages - java-jsonld classes not on the classpath - JSON-LD input-output not available.
E         [main] WARN org.apache.jena.riot.RDFLanguages - Minimum jarfiles are jsonld-java, jackson-core, jackson-annotations
E         [main] WARN org.apache.jena.riot.RDFLanguages - If using a Jena distribution, put all jars in the lib/ directory on the classpath
E         WARNING: An illegal reflective access operation has occurred
E         WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/C:/Users/page_ju/Anaconda/envs/prod_env/Lib/site-packages/owlready2/pellet/guice-4.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
E         WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
E         WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
E         WARNING: All illegal access operations will be denied in a future release
E         [main] WARN org.semanticweb.owlapi.util.SAXParsers - http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
E         [main] WARN org.semanticweb.owlapi.util.SAXParsers - entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
E         [main] WARN org.semanticweb.owlapi.util.SAXParsers - http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
E         [main] WARN org.semanticweb.owlapi.util.SAXParsers - entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
E         [main] INFO org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer - dumping remaining triples
E         [main] INFO org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer - done dumping remaining triples
E         Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
E         at com.clarkparsia.pellet.datatypes.types.floating.XSDFloat.getValue(XSDFloat.java:81)
E         at com.clarkparsia.pellet.datatypes.types.floating.XSDFloat.getCanonicalRepresentation(XSDFloat.java:58)
E         at com.clarkparsia.pellet.datatypes.DatatypeReasonerImpl.getCanonicalRepresentation(DatatypeReasonerImpl.java:365)
E         at org.mindswap.pellet.ABox.createLiteral(ABox.java:1746)
E         at org.mindswap.pellet.ABox.addLiteral(ABox.java:1725)
E         at org.mindswap.pellet.KnowledgeBase.addPropertyValue(KnowledgeBase.java:1002)
E         at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:1275)
E         at uk.ac.manchester.cs.owl.owlapi.OWLDataPropertyAssertionAxiomImpl.accept(OWLDataPropertyAssertionAxiomImpl.java:124)
E         at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:839)
E         at uk.ac.manchester.cs.owl.owlapi.OWLImmutableOntologyImpl.accept(OWLImmutableOntologyImpl.java:850)
E         at com.clarkparsia.pellet.owlapiv3.PelletReasoner.refresh(PelletReasoner.java:967)
E         at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:345)
E         at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:304)
E         at com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.createReasoner(PelletReasonerFactory.java:61)
E         at com.clarkparsia.pellet.owlapiv3.OWLAPILoader.load(OWLAPILoader.java:119)
E         at org.mindswap.pellet.KBLoader.createKB(KBLoader.java:66)
E         at pellet.PelletCmdApp.getKB(PelletCmdApp.java:232)
E         at pellet.PelletCmdApp.getKB(PelletCmdApp.java:220)
E         at pellet.PelletRealize.run(PelletRealize.java:67)
E         at pellet.Pellet.run(Pellet.java:105)
E         at pellet.Pellet.main(Pellet.java:59)
E         Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
E         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
E         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
E         at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
E         ... 21 more

I don't really know what it means...

Cheers,
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Jiba
Administrator
Hi,

Error is here : java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

I think it means that the DatatypeConverter Java class was not found. Since it is in "javax", it should be included in you Java distribution. Possibly something is broken in your Java, or maybe it is outdated ?

Here is the version I use:

# java -version
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (build 1.8.0_202-b26)
OpenJDK 64-Bit Server VM (build 25.202-b26, mixed mode)

Best regards,
Jiba
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Oli
Hi Jiba,

Sorry for the late reply, got busy with other work and couldn't try this. I tried with another Java version and now it works (yay!). Thank you so much for the help :)

Cheeers,
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Error when running sync_reasoner_pellet

Lynsie
I tried 2 java versions but I still have the same problem; each time I call sync_reasoner_pellet() , I get some errors!