Hi,
I get some massive pellet related java errors when I try to sync the reasoner on an ontology that contains data properties. This works even on very simple ontologies containing only a single individual with a data property. This is independent of the infer_data_property_values parameter. I'm going to use hermit for now, but it would be great if this could be fixed. |
Administrator
|
Hi,
Could you send me a small example of ontology that causes this problem, please? Jiba |
Hi Jiba,
thanks for your response. Stefan and I are working together, so I will send you a small example: ONTOLOGY <?xml version="1.0"?> <rdf:RDF xmlns="http://www.example.org/onto#" xml:base="http://www.example.org/onto" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <owl:Ontology rdf:about="http://www.example.org/onto"/> <owl:DatatypeProperty rdf:about="http://www.example.org/onto#testDP"> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> </owl:DatatypeProperty> <owl:Class rdf:about="http://www.example.org/onto#A"/> <owl:NamedIndividual rdf:about="http://www.example.org/onto#I1"> <rdf:type rdf:resource="http://www.example.org/onto#A"/> <testDP rdf:datatype="http://www.w3.org/2001/XMLSchema#float">1.0</testDP> </owl:NamedIndividual> </rdf:RDF> PYTHON CODE with onto: or2.sync_reasoner_pellet() Although running a reasoner in Protégé does not indicate any inconsistencies, we get Java related exceptions running the above code. Best, Marie |
Administrator
|
Hi,
I've tried your ontology, but I get no error (using Owlready 0.18). Can you give me the error traceback please? I notice you use float in your ontology; by default Owlready uses decimal for representing float numbers. Maybe this can be a source of troubles. You can force Owlready to use float with: set_datatype_iri(float, "http://www.w3.org/2001/XMLSchema#float") Best regards, Jiba |
Hello Jiba,
I tried the set_datatype function, but I get the same error message. Moreover, I tried to use decimal in the ontology instead of float - still the same error. The following message is produced running Pellet on the ontology with decimal values: Traceback (most recent call last): File ".../venv/lib/python3.6/site-packages/owlready2/reasoning.py", line 239, in sync_reasoner_pellet output = subprocess.run(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE, check = True).stdout File "/usr/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['java', '-Xmx2000M', '-cp', '.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-ntriples-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/xml-apis-1.4.01.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/jena-core-2.13.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-owlapi-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/slf4j-api-1.7.5.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-model-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/guice-4.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/jena-arq-2.13.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/javax.inject-1.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/jena-iri-1.1.2.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-datatypes-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/xz-1.5.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/commons-lang3-3.3.2.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/commons-csv-1.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-turtle-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-languages-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/owlapi-distribution-4.1.4.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/aopalliance-1.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-explanation-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/xercesImpl-2.11.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/aterm-java-1.8.2-p1.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/commons-io-2.4.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/jjtraveler-0.6.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/jgrapht-jdk1.5-0.7.3.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-pellint-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/guice-assistedinject-4.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/antlr-runtime-3.4.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-jena-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/guava-18.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/trove4j-3.0.3.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-cli-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/shared-objects-1.4.9-p1.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/stringtemplate-3.2.1.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/slf4j-simple-1.7.5.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-util-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-query-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-api-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/sesame-rio-nquads-2.7.16.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/guice-multibindings-4.0.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/pellet-core-2.4.0-SNAPSHOT.jar:.../venv/lib/python3.6/site-packages/owlready2/pellet/commons-codec-1.6.jar', 'pellet.Pellet', 'realize', '--ignore-imports', '/tmp/tmp8q7gh6dz']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".../pellet_test.py", line 6, in <module> or2.sync_reasoner_pellet() File ".../venv/lib/python3.6/site-packages/owlready2/reasoning.py", line 244, in sync_reasoner_pellet raise OwlReadyJavaError("Java error message is:\n%s" % (e.stderr or b"").decode("utf8")) owlready2.base.OwlReadyJavaError: Java error message is: [main] WARN org.apache.jena.riot.RDFLanguages - java-jsonld classes not on the classpath - JSON-LD input-output not available. [main] WARN org.apache.jena.riot.RDFLanguages - Minimum jarfiles are jsonld-java, jackson-core, jackson-annotations [main] WARN org.apache.jena.riot.RDFLanguages - If using a Jena distribution, put all jars in the lib/ directory on the classpath WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:.../venv/lib/python3.6/site-packages/owlready2/pellet/guice-4.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [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 [main] WARN org.semanticweb.owlapi.util.SAXParsers - entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl [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 [main] WARN org.semanticweb.owlapi.util.SAXParsers - entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl [main] INFO org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer - dumping remaining triples [main] INFO org.semanticweb.owlapi.rdf.rdfxml.parser.OWLRDFConsumer - done dumping remaining triples Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at com.clarkparsia.pellet.datatypes.types.real.XSDDecimal.getCanonicalRepresentation(XSDDecimal.java:71) at com.clarkparsia.pellet.datatypes.DatatypeReasonerImpl.getCanonicalRepresentation(DatatypeReasonerImpl.java:365) at org.mindswap.pellet.ABox.createLiteral(ABox.java:1746) at org.mindswap.pellet.ABox.addLiteral(ABox.java:1725) at org.mindswap.pellet.KnowledgeBase.addPropertyValue(KnowledgeBase.java:1002) at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:1275) at uk.ac.manchester.cs.owl.owlapi.OWLDataPropertyAssertionAxiomImpl.accept(OWLDataPropertyAssertionAxiomImpl.java:124) at com.clarkparsia.pellet.owlapiv3.PelletVisitor.visit(PelletVisitor.java:839) at uk.ac.manchester.cs.owl.owlapi.OWLImmutableOntologyImpl.accept(OWLImmutableOntologyImpl.java:850) at com.clarkparsia.pellet.owlapiv3.PelletReasoner.refresh(PelletReasoner.java:967) at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:345) at com.clarkparsia.pellet.owlapiv3.PelletReasoner.<init>(PelletReasoner.java:304) at com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.createReasoner(PelletReasonerFactory.java:61) at com.clarkparsia.pellet.owlapiv3.OWLAPILoader.load(OWLAPILoader.java:119) at org.mindswap.pellet.KBLoader.createKB(KBLoader.java:66) at pellet.PelletCmdApp.getKB(PelletCmdApp.java:232) at pellet.PelletCmdApp.getKB(PelletCmdApp.java:220) at pellet.PelletRealize.run(PelletRealize.java:67) at pellet.Pellet.run(Pellet.java:105) at pellet.Pellet.main(Pellet.java:59) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 20 more Best, Marie |
Administrator
|
Hi,
Maybe you are not using the right version of Java: the java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter suggest that a class is missing in javax.xml, but javax.xml is normally part of Java itself. Which version of Java are you using? I think you need JDK 1.8; here is my version: jiba dans src : java -version openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-b03) OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode) Jiba |
Free forum by Nabble | Edit this page |