You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(11) |
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(5) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
(8) |
Apr
(21) |
May
(12) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(69) |
Aug
(37) |
Sep
(23) |
Oct
(30) |
Nov
(67) |
Dec
(63) |
2008 |
Jan
(79) |
Feb
(80) |
Mar
(99) |
Apr
(75) |
May
(54) |
Jun
(41) |
Jul
(145) |
Aug
(72) |
Sep
(42) |
Oct
(53) |
Nov
(49) |
Dec
(57) |
2009 |
Jan
(36) |
Feb
(20) |
Mar
(73) |
Apr
(27) |
May
(91) |
Jun
(32) |
Jul
(64) |
Aug
(77) |
Sep
(58) |
Oct
(85) |
Nov
(58) |
Dec
(70) |
2010 |
Jan
(61) |
Feb
(102) |
Mar
(66) |
Apr
(96) |
May
(46) |
Jun
(74) |
Jul
(86) |
Aug
(50) |
Sep
(88) |
Oct
(76) |
Nov
(52) |
Dec
(73) |
2011 |
Jan
(113) |
Feb
(84) |
Mar
(57) |
Apr
(63) |
May
(66) |
Jun
(101) |
Jul
(123) |
Aug
(109) |
Sep
(111) |
Oct
(126) |
Nov
(135) |
Dec
(85) |
2012 |
Jan
(57) |
Feb
(60) |
Mar
(81) |
Apr
(66) |
May
(117) |
Jun
(94) |
Jul
(166) |
Aug
(194) |
Sep
(75) |
Oct
(46) |
Nov
(93) |
Dec
(76) |
2013 |
Jan
(79) |
Feb
(130) |
Mar
(79) |
Apr
(63) |
May
(111) |
Jun
(49) |
Jul
(64) |
Aug
(50) |
Sep
(74) |
Oct
(82) |
Nov
(98) |
Dec
(76) |
2014 |
Jan
(52) |
Feb
(47) |
Mar
(83) |
Apr
(42) |
May
(15) |
Jun
(54) |
Jul
(77) |
Aug
(72) |
Sep
(25) |
Oct
(42) |
Nov
(41) |
Dec
(62) |
2015 |
Jan
(56) |
Feb
(16) |
Mar
(17) |
Apr
(19) |
May
(18) |
Jun
(47) |
Jul
(24) |
Aug
(31) |
Sep
(26) |
Oct
(40) |
Nov
(35) |
Dec
(39) |
2016 |
Jan
(62) |
Feb
(102) |
Mar
(62) |
Apr
(6) |
May
(10) |
Jun
(30) |
Jul
(27) |
Aug
(21) |
Sep
(32) |
Oct
(7) |
Nov
(8) |
Dec
(47) |
2017 |
Jan
(43) |
Feb
(30) |
Mar
(17) |
Apr
(33) |
May
(11) |
Jun
(12) |
Jul
(14) |
Aug
(1) |
Sep
(11) |
Oct
(36) |
Nov
(2) |
Dec
(5) |
2018 |
Jan
(23) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(7) |
Jul
(1) |
Aug
(14) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Stian Soiland-R. <soi...@ma...> - 2025-01-21 20:23:43
|
Note that this ontology has both an "allowedValue" and "allowedValues", the second is recognised by Protege to be implied object propertyl as it has a range of AllowedValues which is defined as a class. However the first singular form, has no defined domain or range, and is not used on any other statements. So by the open world assumption and OWL2-RDF specification there is no way to say what kind of property it is meant to be. You could argue it should then be recognised as an Individual, but i think that is avoided by the OWL API code for good reason. What I would recommend, if you can't convince the OASIS/OCLS maintainers to declare their OWL ontology in OWL, then use a quotation to define the property in OWL yourself. Use rdfs;isDefinedBy to define the original source, and owl:import to get the rest (e.g. label, range). <http://www.semanticweb.org/stain/ontologies/2025/0/untitled-ontology-21> rdf:type owl:Ontology ; owl:imports <http://open-services.net/ns/core#> . <http://open-services.net/ns/core#allowedValue> rdf:type owl:AnnotationProperty ; rdfs:isDefinedBy <http://open-services.net/ns/core#> . After reloading in protege, you get the remaining annotations (rdfs:label, rdfs:comment) loaded from the OWL import (label, comment) and the property is listed under Annotation properties. Note that if the owl import brings in lots of things you don't want, just expand the quotation to include just enough. -- Stian Soiland-Reyes, The University of Manchester https://www.esciencelab.org.uk/ https://orcid.org/0000-0001-9842-9718 Please note that I may work flexibly – whilst it suits me to email now, I do not expect a response or action outside of your own working hours. ________________________________________ From: Samson Tu <sw...@st...> Sent: 21 January 2025 16:18 To: owl...@li... Subject: Re: [OWLAPI-developer] Questions about OWL 2 RDF-Based Semantics I meant to say "oclc:allowedValue is not declared an OWL entity at all and is invisible in Protégé." On Jan 20, 2025, at 5:22 PM, Samson Tu <sw...@st...> wrote: The example Steve posted on the Protégé-user mailing list is oslc:allowedValue a rdf:Property ; rdfs:isDefinedBy oslc: ; rdfs:label "allowedValue" ; rdfs:comment "Specifies the allowed values for a property (may be more than one)." . I downloaded the ontology from https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.ttl [docs.oasis-open-projects.org]<https://urldefense.com/v3/__https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.ttl__;!!PDiH4ENfjr2_Jw!CrXNij7N6JRLbkVtQwXO--l-RswlO4estOVXL7KPz8G_sj9N5_OzGN0_vst9gZ2NouRid3HSlsDtiGOhdGtVCwznsQ$> After loading it in Protégé and saving it as a turtle-syntax serialisation, the output file contains ################################################################# # Annotations ################################################################# oslc:allowedValue rdfs:comment "Specifies the allowed values for a property (may be more than one)." ; rdfs:isDefinedBy <http://open-services.net/ns/core#> [open-services.net]<https://urldefense.com/v3/__http://open-services.net/ns/core*__;Iw!!PDiH4ENfjr2_Jw!CrXNij7N6JRLbkVtQwXO--l-RswlO4estOVXL7KPz8G_sj9N5_OzGN0_vst9gZ2NouRid3HSlsDtiGOhdGvH5-_p5Q$> ; rdfs:label "allowedValue” . However, iclc: allowedValue is not declared as an annotation property, which I find surprising. oclc:allowedValue is not declared an OWL entity at all and is visible in Protégé. Is that the expected behavior? Thank you. With best regards, Samson On Jan 20, 2025, at 3:12 PM, Ignazio Palmisano <ipa...@gm...> wrote: Hi, The list is quite low traffic these days so I'm not sure how many people still read ot actively. OWLAPI doesn't do transformations from rdfs vocabulary, really - there are equivalences between some rdf/rdfs vocabulary and owl vocabulary, like rdfs:Class and owl:Class. But rdf: Property doesn't map to data or object properties, which I guess is what you're seeing. An example would help. Cheers, Ignazio On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Someone in the Protege list referred me to you for questions about the relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based Semantics." When an ontology using that standard is loaded in Protege, classes and individuals are listed, but not the properties. It appears OWLAPI makes some transformations of an input file, e.g., rdfs:Class will be transformed to owl:Class. Are there OWLAPI configuration settings or APIs for transformations? Do the OWLAPI transformations relate in some way to the above standard, e.g., recognize some of their axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL 2 Direct Semantics transforms? _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer [lists.sourceforge.net]<https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/owlapi-developer__;!!PDiH4ENfjr2_Jw!CrXNij7N6JRLbkVtQwXO--l-RswlO4estOVXL7KPz8G_sj9N5_OzGN0_vst9gZ2NouRid3HSlsDtiGOhdGur_-yzWg$> _______________________________________________ Owlapi-developer mailing list Owl...@li... https://lists.sourceforge.net/lists/listinfo/owlapi-developer [lists.sourceforge.net]<https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/owlapi-developer__;!!PDiH4ENfjr2_Jw!CrXNij7N6JRLbkVtQwXO--l-RswlO4estOVXL7KPz8G_sj9N5_OzGN0_vst9gZ2NouRid3HSlsDtiGOhdGur_-yzWg$> |
From: Samson Tu <sw...@st...> - 2025-01-21 16:19:01
|
I meant to say "oclc:allowedValue is not declared an OWL entity at all and is invisible in Protégé." On Jan 20, 2025, at 5:22 PM, Samson Tu <sw...@st...> wrote: The example Steve posted on the Protégé-user mailing list is oslc:allowedValue a rdf:Property ; rdfs:isDefinedBy oslc: ; rdfs:label "allowedValue" ; rdfs:comment "Specifies the allowed values for a property (may be more than one)." . I downloaded the ontology from https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.ttl After loading it in Protégé and saving it as a turtle-syntax serialisation, the output file contains ################################################################# # Annotations ################################################################# oslc:allowedValue rdfs:comment "Specifies the allowed values for a property (may be more than one)." ; rdfs:isDefinedBy <http://open-services.net/ns/core#><http://open-services.net/ns/core#> ; rdfs:label "allowedValue” . However, iclc: allowedValue is not declared as an annotation property, which I find surprising. oclc:allowedValue is not declared an OWL entity at all and is visible in Protégé. Is that the expected behavior? Thank you. With best regards, Samson On Jan 20, 2025, at 3:12 PM, Ignazio Palmisano <ipa...@gm...> wrote: Hi, The list is quite low traffic these days so I'm not sure how many people still read ot actively. OWLAPI doesn't do transformations from rdfs vocabulary, really - there are equivalences between some rdf/rdfs vocabulary and owl vocabulary, like rdfs:Class and owl:Class. But rdf: Property doesn't map to data or object properties, which I guess is what you're seeing. An example would help. Cheers, Ignazio On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Someone in the Protege list referred me to you for questions about the relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based Semantics." When an ontology using that standard is loaded in Protege, classes and individuals are listed, but not the properties. It appears OWLAPI makes some transformations of an input file, e.g., rdfs:Class will be transformed to owl:Class. Are there OWLAPI configuration settings or APIs for transformations? Do the OWLAPI transformations relate in some way to the above standard, e.g., recognize some of their axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL 2 Direct Semantics transforms? _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer _______________________________________________ Owlapi-developer mailing list Owl...@li... https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Ignazio P. <ipa...@gm...> - 2025-01-21 07:34:25
|
On Tue, 21 Jan 2025, 07:28 Samson Tu, <sw...@st...> wrote: > The example Steve posted on the Protégé-user mailing list is > > oslc:allowedValue > a rdf:Property ; > rdfs:isDefinedBy oslc: ; > rdfs:label "allowedValue" ; > rdfs:comment "Specifies the allowed values for a property (may be more > than one)." . > > I downloaded the ontology from > https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.ttl > > After loading it in Protégé and saving it as a turtle-syntax > serialisation, the output file contains > > ################################################################# > # Annotations > ################################################################# > > oslc:allowedValue rdfs:comment "Specifies the allowed values for a > property (may be more than one)." ; > rdfs:isDefinedBy <http://open-services.net/ns/core#> > <http://open-services.net/ns/core#> ; > rdfs:label "allowedValue” . > However, iclc: allowedValue is not declared as an annotation property, > which I find surprising. oclc:allowedValue is not declared an OWL entity at > all and is visible in Protégé. Is that the expected behavior? > In retrospect, I think yes. rdf:Property is getting ignored and the remaining triples look just like an individual with a few annotations. I'm not sure if the type should be kept or discarded, in this case. I. > > Thank you. > > With best regards, > Samson > > > On Jan 20, 2025, at 3:12 PM, Ignazio Palmisano < > ipa...@gm...> wrote: > > Hi, > The list is quite low traffic these days so I'm not sure how many people > still read ot actively. > > OWLAPI doesn't do transformations from rdfs vocabulary, really - there are > equivalences between some rdf/rdfs vocabulary and owl vocabulary, like > rdfs:Class and owl:Class. > But rdf: Property doesn't map to data or object properties, which I guess > is what you're seeing. An example would help. > > Cheers, > Ignazio > > On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, < > owl...@li...> wrote: > >> Someone in the Protege list referred me to you for questions about the >> relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based >> Semantics." When an ontology using that standard is loaded in Protege, >> classes and individuals are listed, but not the properties. It appears >> OWLAPI makes some transformations of an input file, e.g., rdfs:Class >> will be transformed to owl:Class. Are there OWLAPI configuration >> settings or APIs for transformations? Do the OWLAPI transformations >> relate in some way to the above standard, e.g., recognize some of their >> axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL >> 2 Direct Semantics transforms? >> >> >> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Samson Tu <sw...@st...> - 2025-01-21 01:22:36
|
The example Steve posted on the Protégé-user mailing list is oslc:allowedValue a rdf:Property ; rdfs:isDefinedBy oslc: ; rdfs:label "allowedValue" ; rdfs:comment "Specifies the allowed values for a property (may be more than one)." . I downloaded the ontology from https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/core-vocab.ttl After loading it in Protégé and saving it as a turtle-syntax serialisation, the output file contains ################################################################# # Annotations ################################################################# oslc:allowedValue rdfs:comment "Specifies the allowed values for a property (may be more than one)." ; rdfs:isDefinedBy <http://open-services.net/ns/core#><http://open-services.net/ns/core#> ; rdfs:label "allowedValue” . However, iclc: allowedValue is not declared as an annotation property, which I find surprising. oclc:allowedValue is not declared an OWL entity at all and is visible in Protégé. Is that the expected behavior? Thank you. With best regards, Samson On Jan 20, 2025, at 3:12 PM, Ignazio Palmisano <ipa...@gm...> wrote: Hi, The list is quite low traffic these days so I'm not sure how many people still read ot actively. OWLAPI doesn't do transformations from rdfs vocabulary, really - there are equivalences between some rdf/rdfs vocabulary and owl vocabulary, like rdfs:Class and owl:Class. But rdf: Property doesn't map to data or object properties, which I guess is what you're seeing. An example would help. Cheers, Ignazio On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Someone in the Protege list referred me to you for questions about the relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based Semantics." When an ontology using that standard is loaded in Protege, classes and individuals are listed, but not the properties. It appears OWLAPI makes some transformations of an input file, e.g., rdfs:Class will be transformed to owl:Class. Are there OWLAPI configuration settings or APIs for transformations? Do the OWLAPI transformations relate in some way to the above standard, e.g., recognize some of their axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL 2 Direct Semantics transforms? _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer _______________________________________________ Owlapi-developer mailing list Owl...@li... https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Steve V. <ste...@ga...> - 2025-01-21 01:01:29
|
It does the rdfs:Class to owl:Class thing, but it removes statements like "oslc:serviceProvider a rdf:Property". Is there any OWLOntologyLoaderConfiguration method that would allow triples with rdf:Property to at least pass through if not specify a way to transform? For example, what does "public OWLOntologyLoaderConfiguration setLoadAnnotationAxioms(boolean b)" do? On 1/20/2025 5:12 PM, Ignazio Palmisano wrote: > Hi, > The list is quite low traffic these days so I'm not sure how many > people still read ot actively. > > OWLAPI doesn't do transformations from rdfs vocabulary, really - there > are equivalences between some rdf/rdfs vocabulary and owl vocabulary, > like rdfs:Class and owl:Class. > But rdf: Property doesn't map to data or object properties, which I > guess is what you're seeing. An example would help. > > Cheers, > Ignazio > > On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, > <owl...@li...> wrote: > > Someone in the Protege list referred me to you for questions about > the > relationship between OWLAPI and "OWL 2 Web Ontology Language > RDF-Based > Semantics." When an ontology using that standard is loaded in > Protege, > classes and individuals are listed, but not the properties. It > appears > OWLAPI makes some transformations of an input file, e.g., rdfs:Class > will be transformed to owl:Class. Are there OWLAPI configuration > settings or APIs for transformations? Do the OWLAPI transformations > relate in some way to the above standard, e.g., recognize some of > their > axiomatic triples and do some of their OWL 2 RDF-Based Semantics > to OWL > 2 Direct Semantics transforms? > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Ignazio P. <ipa...@gm...> - 2025-01-20 23:12:19
|
Hi, The list is quite low traffic these days so I'm not sure how many people still read ot actively. OWLAPI doesn't do transformations from rdfs vocabulary, really - there are equivalences between some rdf/rdfs vocabulary and owl vocabulary, like rdfs:Class and owl:Class. But rdf: Property doesn't map to data or object properties, which I guess is what you're seeing. An example would help. Cheers, Ignazio On Mon, 20 Jan 2025, 23:01 Steve Vestal via Owlapi-developer, < owl...@li...> wrote: > Someone in the Protege list referred me to you for questions about the > relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based > Semantics." When an ontology using that standard is loaded in Protege, > classes and individuals are listed, but not the properties. It appears > OWLAPI makes some transformations of an input file, e.g., rdfs:Class > will be transformed to owl:Class. Are there OWLAPI configuration > settings or APIs for transformations? Do the OWLAPI transformations > relate in some way to the above standard, e.g., recognize some of their > axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL > 2 Direct Semantics transforms? > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Steve V. <ste...@ga...> - 2025-01-20 22:41:37
|
Someone in the Protege list referred me to you for questions about the relationship between OWLAPI and "OWL 2 Web Ontology Language RDF-Based Semantics." When an ontology using that standard is loaded in Protege, classes and individuals are listed, but not the properties. It appears OWLAPI makes some transformations of an input file, e.g., rdfs:Class will be transformed to owl:Class. Are there OWLAPI configuration settings or APIs for transformations? Do the OWLAPI transformations relate in some way to the above standard, e.g., recognize some of their axiomatic triples and do some of their OWL 2 RDF-Based Semantics to OWL 2 Direct Semantics transforms? |
From: Gunjan S. <gu...@ii...> - 2023-05-22 13:15:07
|
Dear All, TL;DR ************************ This is the first call for participation for the third edition of the Semantic Reasoning Evaluation Challenge (SemREC) <https://semrec.github.io/> collocated with the 22nd International Semantic Web Conference <https://iswc2023.semanticweb.org/>. 1. Ontologies - Submit a real-world ontology that is a challenge in terms of the reasoning time or memory consumed during reasoning. We expect a detailed description of the ontology along with the analysis of the reasoning performance, the workarounds if any, that were used to make the ontology less challenging (for example, dropping a few axioms, redesigning the ontology, etc.), and the (potential) applications in which the ontology could be used. We will be evaluating the submitted ontologies based on the time consumed for a reasoning task, such as classification, and the memory consumed during reasoning. 2. *Systems* - Submit an ontology/RDFS reasoner that uses neural-symbolic techniques for reasoning and optimization. Deadline - 15 August 2023, 23:59 (AOE) If you have any questions, please contact me (gu...@ii...). Further details are on the website: https://semrec.github.io/. ************************ Longer version ************************* Despite the development of several ontology reasoning optimizations, the traditional methods either do not scale well or only cover a subset of OWL 2 language constructs. As an alternative, neuro-symbolic approaches are gaining significant attention. However, the existing methods can not deal with very expressive ontology languages. Other than that, some SPARQL query engines also support reasoning, but their performance also is still limited. To find and improve these performance bottlenecks of the reasoners, we ideally need several real-world ontologies that span the broad spectrum in terms of their size and expressivity. However, that is often not the case. One of the potential reasons for ontology developers to not build ontologies that vary in terms of size and expressivity is the performance bottleneck of the reasoners. SemREC aims to deal with this chicken and egg problem. The second edition of this challenge includes the following tasks- - Task-1 - Ontologies. Submit a real-world ontology that is a challenge in terms of the reasoning time or memory consumed during reasoning. We expect a detailed description of the ontology along with the analysis of the reasoning performance, the workarounds if any, that were used to make the ontology less challenging (for example, dropping a few axioms, redesigning the ontology, etc.), and the (potential) applications in which the ontology could be used. We will be evaluating the submitted ontologies based on the time consumed for a reasoning task, such as classification, and the memory consumed during reasoning. - Task-2 - Systems - Ontology/RDFS Reasoners. Submit an ontology/RDFS reasoner that uses neural-symbolic techniques for reasoning and optimization. In terms of technique used, the submissions could fall under any of the below (or related) categories. 1. Using learning-based techniques for performance optimization of traditional reasoning algorithms. 2. Inductive reasoning techniques based on a subsymbolic representation of entities and relations learned through the maximization of an objective function over valid triples. 3. Techniques that can learn the deductive reasoning aspect using the ontology axioms. 4. Neural Multi-hop reasoners to deal with reasoning where multi-hop inference is required. Based on precision and recall, we will evaluate the submitted systems on the test datasets for scalability (performance evaluation on large and expressive ontologies) and transfer capabilities (ability to reason over ontologies from different domains). We expect a detailed description of the system, including an evaluation of the system on the provided datasets. - SPARQL query engines that support entailment regimes such as RDF, RDFS, or OWL 2. We expect a detailed description of the system, including an evaluation of the system on the provided datasets. Submission Details Participants are requested to make a manuscript submission describing their entry. - For Task 1, we expect a detailed description of the ontology along with the analysis of the reasoning performance, and the workarounds, if any, that were used to make the ontology less challenging (for example, dropping a few axioms, redesigning the ontology, etc.), and the (potential) applications in which the ontology could be used. - For Task 2, we expect a detailed description of the system, including evaluating the system on the provided datasets. We will further evaluate the submitted systems on a subset of the test datasets for scalability (performance evaluation on large and expressive ontologies) and transfer capabilities (ability to reason over ontologies from different domains). The submissions can be either in the form of short papers of length 5 pages or long papers of length 10-12 pages. All the submissions must be in English and follow the 1-column CEUR-ART style (overleaf template) <https://www.overleaf.com/latex/templates/ceurart-template-for-submissions-to-semrec-challenge/qktzxsbyhsdp>. The proceedings will be published as a volume of CEUR-WS <http://ceur-ws.org/>. Submissions should be made in the form of a pdf document on EasyChair. Website: https://semrec.github.io/ Organizers Gunjan Singh, IIIT-Delhi, India. Raghava Mutharaju, IIIT-Delhi, India. Pavan Kapanipathi, IBM T.J. Watson Research Center, USA. Best regards, Gunjan -- Thanks and Regards Gunjan Singh Ph. D Student, KRaCR Lab <https://kracr.iiitd.edu.in/>, IIIT-Delhi <https://cse.iiitd.ac.in/>, India IBM Research Fellow |
From: Jim B. <ba...@gm...> - 2022-03-03 15:48:13
|
Thanks! It’s helpful to know that it wouldn’t necessarily be rejected. It does bother me that it is very clearly unsupported. I’ll have to see how critical depending on RDF lists is to the members of the working group. Thanks, Jim > On Mar 3, 2022, at 10:06 AM, Ignazio Palmisano <ipa...@gm...> wrote: > > Hi, > Declaration of rdf:first as an object property would create profile violations, but whether that's acceptable or not depends on the application - OWLAPI won't mind too much. > > I'm not sure if altering the parser to do this is doable - it's certainly complicated, that part of the code is quite convoluted. We'd accept a contribution to implement this depending on what its effects are; it's not something supported by the specs, so the issue really is that we should be sure it doesn't affect users with compliant ontologies and does not create a (new) maintenance problem. > > Cheers, > I. > > On Thu, 3 Mar 2022, 14:33 Jim Balhoff, <ba...@gm... <mailto:ba...@gm...>> wrote: > Hello, > > I’ve recently been participating in the FHIR RDF working group, which is revising the RDF representation for data in the FHIR data model (https://www.fhir.org <https://www.fhir.org/>). One of the desires of the group, from an RDF perspective, is to represent ordered data using standard RDF lists (i.e., using rdf:first and rdf:rest, etc.). But they also would like FHIR datasets to be usable as OWL. I know that according to the OWL spec, using lists in this way is forbidden. But I did some experiments on the results of declaring rdf:first and rdf:rest as object properties, and adding a few helper axioms to support accessing items in lists. If such an ontology is written in OWL functional syntax, OWL API seems to work as expected, including various reasoners. It even writes the ontology to RDF “correctly”. But parsing such an ontology from RDF doesn’t work. All the abox axioms using lists disappear. I made a summary document: https://docs.google.com/document/d/1kNkP0EHfUiEj9GwO4NtzHXQD4kVTViphV0ngGfHBnBI/edit# <https://docs.google.com/document/d/1kNkP0EHfUiEj9GwO4NtzHXQD4kVTViphV0ngGfHBnBI/edit#> > > Is there any way that the RDF-to-OWL parser could allow these axioms to be parsed? If it could be done, would OWL API accept a pull request making this possible? I’ve thought of a few other alternatives, such as providing a SPARQL Update which could be run prior to using a dataset as OWL. But this creates a hurdle to working with OWL which we’d like to avoid. > > Best regards, > Jim > > ____________________________________________ > James P. Balhoff, Ph.D. > Renaissance Computing Institute (RENCI) > University of North Carolina at Chapel Hill > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... <mailto:Owl...@li...> > https://lists.sourceforge.net/lists/listinfo/owlapi-developer <https://lists.sourceforge.net/lists/listinfo/owlapi-developer> > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Ignazio P. <ipa...@gm...> - 2022-03-03 15:07:10
|
Hi, Declaration of rdf:first as an object property would create profile violations, but whether that's acceptable or not depends on the application - OWLAPI won't mind too much. I'm not sure if altering the parser to do this is doable - it's certainly complicated, that part of the code is quite convoluted. We'd accept a contribution to implement this depending on what its effects are; it's not something supported by the specs, so the issue really is that we should be sure it doesn't affect users with compliant ontologies and does not create a (new) maintenance problem. Cheers, I. On Thu, 3 Mar 2022, 14:33 Jim Balhoff, <ba...@gm...> wrote: > Hello, > > I’ve recently been participating in the FHIR RDF working group, which is > revising the RDF representation for data in the FHIR data model ( > https://www.fhir.org). One of the desires of the group, from an RDF > perspective, is to represent ordered data using standard RDF lists (i.e., > using rdf:first and rdf:rest, etc.). But they also would like FHIR datasets > to be usable as OWL. I know that according to the OWL spec, using lists in > this way is forbidden. But I did some experiments on the results of > declaring rdf:first and rdf:rest as object properties, and adding a few > helper axioms to support accessing items in lists. If such an ontology is > written in OWL functional syntax, OWL API seems to work as expected, > including various reasoners. It even writes the ontology to RDF > “correctly”. But parsing such an ontology from RDF doesn’t work. All the > abox axioms using lists disappear. I made a summary document: > https://docs.google.com/document/d/1kNkP0EHfUiEj9GwO4NtzHXQD4kVTViphV0ngGfHBnBI/edit# > > Is there any way that the RDF-to-OWL parser could allow these axioms to be > parsed? If it could be done, would OWL API accept a pull request making > this possible? I’ve thought of a few other alternatives, such as providing > a SPARQL Update which could be run prior to using a dataset as OWL. But > this creates a hurdle to working with OWL which we’d like to avoid. > > Best regards, > Jim > > ____________________________________________ > James P. Balhoff, Ph.D. > Renaissance Computing Institute (RENCI) > University of North Carolina at Chapel Hill > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Jim B. <ba...@gm...> - 2022-03-03 14:33:46
|
Hello, I’ve recently been participating in the FHIR RDF working group, which is revising the RDF representation for data in the FHIR data model (https://www.fhir.org). One of the desires of the group, from an RDF perspective, is to represent ordered data using standard RDF lists (i.e., using rdf:first and rdf:rest, etc.). But they also would like FHIR datasets to be usable as OWL. I know that according to the OWL spec, using lists in this way is forbidden. But I did some experiments on the results of declaring rdf:first and rdf:rest as object properties, and adding a few helper axioms to support accessing items in lists. If such an ontology is written in OWL functional syntax, OWL API seems to work as expected, including various reasoners. It even writes the ontology to RDF “correctly”. But parsing such an ontology from RDF doesn’t work. All the abox axioms using lists disappear. I made a summary document: https://docs.google.com/document/d/1kNkP0EHfUiEj9GwO4NtzHXQD4kVTViphV0ngGfHBnBI/edit# Is there any way that the RDF-to-OWL parser could allow these axioms to be parsed? If it could be done, would OWL API accept a pull request making this possible? I’ve thought of a few other alternatives, such as providing a SPARQL Update which could be run prior to using a dataset as OWL. But this creates a hurdle to working with OWL which we’d like to avoid. Best regards, Jim ____________________________________________ James P. Balhoff, Ph.D. Renaissance Computing Institute (RENCI) University of North Carolina at Chapel Hill |
From: Ignazio P. <ipa...@gm...> - 2022-02-19 21:53:51
|
Hi all, two new releases out, 4.5.21 and 5.1.20 Cheers, I. |
From: Ignazio P. <ipa...@gm...> - 2021-08-27 13:50:56
|
On Fri, 27 Aug 2021, 16:44 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...> wrote: > I think after 15 years of working with the owlapi I’ve terminal > version-itis. 😊 > > Found a trivial bug in my class where OWLReasoner was first declared > instead of SnorocketOWLReasoner. > > Reasoners are all invoked differently, and their documentation can be > scant. > > > > With advice from Dr. Lawley, I was able to get Snorocket working with the > deps below. > > There was mention it should work with owlapi-osgidistribution 4.6, but > it’s not on maven central and 4.5.20 seems to work just fine. > > > There's no 4.6 version at all yet - snorocket uses "4.6)" as upper limit, which excludes any 4.6 version from being used. Possibly overly prescriptive, but at the moment it has no effect. Cheers, I. <dependency> > > <groupId>net.sourceforge.owlapi</groupId> > > <artifactId>owlapi-osgidistribution</artifactId> > > <version>4.5.20</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-owlapi</artifactId> > > <version>4.0.1</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-core</artifactId> > > <version>4.0.1</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>ontology-model</artifactId> > > <version>4.0.1</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>ontology-import</artifactId> > > <version>4.0.1</version> > > </dependency> > > > > > > *From:* Ignazio Palmisano <ipa...@gm...> > *Sent:* Thursday, August 19, 2021 1:22 AM > *To:* owl...@li... > *Subject:* Re: [OWLAPI-developer] Snorocket > > > > > > On Tue, 17 Aug 2021, 22:47 Wynne, Robert (NIH/NLM/LHC) [C] via > Owlapi-developer, <owl...@li...> wrote: > > Thanks for your quick reply! > > > > My test class is attached. > > The error occurs with reasoner.getSubClasses(OWLClass, false) > > > > > > From the stack trace, it looks like the error comes from the call to > getFlattened(); the reasoner might be returning null on that method. If so, > it's a snorocket bug, otherwise there might be an OWLAPI issue involved. > > > > The snorocket pom file specifies OWLAPI between 4.3.1 and 4.5.x, so you > can try a version in that range and it would be expected to work. > > > > Cheers, > > I. > > Stacktrace: > > > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology > loadAxioms > > INFO: Loading 20 axioms > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology > loadAxioms > > INFO: Processing 38 normalised axioms > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify > > INFO: Classifying with 8 threads > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify > > INFO: Running saturation > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.SnorocketReasoner > getClassifiedOntology > > INFO: Building taxonomy > > java.lang.NullPointerException > > at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:40) > > at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) > > Exception in thread "main" java.lang.NullPointerException > > at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:44) > > at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) > > > > > > From the documentation on Github, version 3.0.0 is expected to work with > OWL API 4. > > > > dependencies in pom: > > > > <dependency> > > <groupId>net.sourceforge.owlapi</groupId> > > <artifactId>owlapi-distribution</artifactId> > > <version>4.0.0</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-core</artifactId> > > <version>3.0.0</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-owlapi</artifactId> > > <version>3.0.0</version> > > </dependency> > > > > From an asserted view, here are screenshots from Protégé. (I can send the > ontology off-list if needed.) > > > > > > > > > > > > *From:* Ignazio Palmisano <ipa...@gm...> > *Sent:* Tuesday, August 17, 2021 1:20 PM > *To:* owl...@li... > *Subject:* Re: [OWLAPI-developer] Snorocket > > > > > > On Tue, 17 Aug 2021, 20:14 Wynne, Robert (NIH/NLM/LHC) [C] via > Owlapi-developer, <owl...@li...> wrote: > > Hi, > > > > I’m wondering if Snorocket <https://aehrc.com/snorocket/> is still > available for the owlapi, and if so, what Maven dependencies should be used. > > I’ve tried the latest version but cannot get it to work with very simple > EL2 ontologies. > > > > > > Hi, > > I can't go check snorocket right now, but I'd expect its latest version to > work with the latest OWLAPI of the same major version. I think 2.0 was > using OWLAPI 4? > > > > What errors are you seeing? > > Cheers, > > I. > > > > > > My reason for exploring Snorocket is that ELK has an issue returning > equivalent classes containing DataHasValue axioms (also with simple EL2 > ontologies). > > > > Regards, > > > > Robert W. Wynne > > Medical Ontology Research Programmer > > Contractor, Computational Health Research Branch > > National Library of Medicine > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Wynne, R. (NIH/NLM/L. [C] <wy...@ma...> - 2021-08-27 13:44:29
|
I think after 15 years of working with the owlapi I’ve terminal version-itis. 😊 Found a trivial bug in my class where OWLReasoner was first declared instead of SnorocketOWLReasoner. Reasoners are all invoked differently, and their documentation can be scant. With advice from Dr. Lawley, I was able to get Snorocket working with the deps below. There was mention it should work with owlapi-osgidistribution 4.6, but it’s not on maven central and 4.5.20 seems to work just fine. <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-osgidistribution</artifactId> <version>4.5.20</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-owlapi</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-core</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>ontology-model</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>ontology-import</artifactId> <version>4.0.1</version> </dependency> From: Ignazio Palmisano <ipa...@gm...> Sent: Thursday, August 19, 2021 1:22 AM To: owl...@li... Subject: Re: [OWLAPI-developer] Snorocket On Tue, 17 Aug 2021, 22:47 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Thanks for your quick reply! My test class is attached. The error occurs with reasoner.getSubClasses(OWLClass, false) From the stack trace, it looks like the error comes from the call to getFlattened(); the reasoner might be returning null on that method. If so, it's a snorocket bug, otherwise there might be an OWLAPI issue involved. The snorocket pom file specifies OWLAPI between 4.3.1 and 4.5.x, so you can try a version in that range and it would be expected to work. Cheers, I. Stacktrace: Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology loadAxioms INFO: Loading 20 axioms Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology loadAxioms INFO: Processing 38 normalised axioms Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify INFO: Classifying with 8 threads Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify INFO: Running saturation Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.SnorocketReasoner getClassifiedOntology INFO: Building taxonomy java.lang.NullPointerException at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:40) at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) Exception in thread "main" java.lang.NullPointerException at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:44) at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) From the documentation on Github, version 3.0.0 is expected to work with OWL API 4. dependencies in pom: <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-distribution</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-core</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-owlapi</artifactId> <version>3.0.0</version> </dependency> From an asserted view, here are screenshots from Protégé. (I can send the ontology off-list if needed.) [cid:image001.png@01D7937C.0F7DF620] [cid:image002.png@01D7937C.79C4D710] [cid:image003.png@01D7937C.79C4D710] From: Ignazio Palmisano <ipa...@gm...<mailto:ipa...@gm...>> Sent: Tuesday, August 17, 2021 1:20 PM To: owl...@li...<mailto:owl...@li...> Subject: Re: [OWLAPI-developer] Snorocket On Tue, 17 Aug 2021, 20:14 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Hi, I’m wondering if Snorocket<https://aehrc.com/snorocket/> is still available for the owlapi, and if so, what Maven dependencies should be used. I’ve tried the latest version but cannot get it to work with very simple EL2 ontologies. Hi, I can't go check snorocket right now, but I'd expect its latest version to work with the latest OWLAPI of the same major version. I think 2.0 was using OWLAPI 4? What errors are you seeing? Cheers, I. My reason for exploring Snorocket is that ELK has an issue returning equivalent classes containing DataHasValue axioms (also with simple EL2 ontologies). Regards, Robert W. Wynne Medical Ontology Research Programmer Contractor, Computational Health Research Branch National Library of Medicine _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Shyama <shy...@gm...> - 2021-08-20 08:03:41
|
Hi Can anyone explain why a function has not been defined for getting ranges/Literals of a *data property* through reasoner? Example: We can get all domains and ranges (explicit and inferred ) through a reasoner. - reasoner.getObjectPropertyDomains(obj) - reasoner.r.getObjectPropertyRanges(obj) We can get all domains of a Data Property, but I could not find a function to get ranges/Literals of a data property, However, we can get explicit ranges of a data property from ontology.getDataPropertyRangeAxioms(obj). it is not sufficient for my program. I want to get inferred ranges/Literal as well - reasoner.getDataPropertyDomains(obj) - *reasoner.getDataPropertyLiterial....... ????? or similar function could not be found* Thank You -- Shyama Wilson Department of Computer Science and Informatics Uva Wellassa University: www.uwu.ac.lk Badulla, Sri Lanka email: sh...@uw... <am...@uw...> |
From: Ignazio P. <ipa...@gm...> - 2021-08-19 05:22:42
|
On Tue, 17 Aug 2021, 22:47 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...> wrote: > Thanks for your quick reply! > > > > My test class is attached. > > The error occurs with reasoner.getSubClasses(OWLClass, false) > > > >From the stack trace, it looks like the error comes from the call to getFlattened(); the reasoner might be returning null on that method. If so, it's a snorocket bug, otherwise there might be an OWLAPI issue involved. The snorocket pom file specifies OWLAPI between 4.3.1 and 4.5.x, so you can try a version in that range and it would be expected to work. Cheers, I. > Stacktrace: > > > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology > loadAxioms > > INFO: Loading 20 axioms > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology > loadAxioms > > INFO: Processing 38 normalised axioms > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify > > INFO: Classifying with 8 threads > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify > > INFO: Running saturation > > Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.SnorocketReasoner > getClassifiedOntology > > INFO: Building taxonomy > > java.lang.NullPointerException > > at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:40) > > at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) > > Exception in thread "main" java.lang.NullPointerException > > at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:44) > > at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) > > > > > > From the documentation on Github, version 3.0.0 is expected to work with > OWL API 4. > > > > dependencies in pom: > > > > <dependency> > > <groupId>net.sourceforge.owlapi</groupId> > > <artifactId>owlapi-distribution</artifactId> > > <version>4.0.0</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-core</artifactId> > > <version>3.0.0</version> > > </dependency> > > <dependency> > > <groupId>au.csiro</groupId> > > <artifactId>snorocket-owlapi</artifactId> > > <version>3.0.0</version> > > </dependency> > > > > From an asserted view, here are screenshots from Protégé. (I can send the > ontology off-list if needed.) > > > > > > > > > > > > *From:* Ignazio Palmisano <ipa...@gm...> > *Sent:* Tuesday, August 17, 2021 1:20 PM > *To:* owl...@li... > *Subject:* Re: [OWLAPI-developer] Snorocket > > > > > > On Tue, 17 Aug 2021, 20:14 Wynne, Robert (NIH/NLM/LHC) [C] via > Owlapi-developer, <owl...@li...> wrote: > > Hi, > > > > I’m wondering if Snorocket <https://aehrc.com/snorocket/> is still > available for the owlapi, and if so, what Maven dependencies should be used. > > I’ve tried the latest version but cannot get it to work with very simple > EL2 ontologies. > > > > > > Hi, > > I can't go check snorocket right now, but I'd expect its latest version to > work with the latest OWLAPI of the same major version. I think 2.0 was > using OWLAPI 4? > > > > What errors are you seeing? > > Cheers, > > I. > > > > > > My reason for exploring Snorocket is that ELK has an issue returning > equivalent classes containing DataHasValue axioms (also with simple EL2 > ontologies). > > > > Regards, > > > > Robert W. Wynne > > Medical Ontology Research Programmer > > Contractor, Computational Health Research Branch > > National Library of Medicine > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Wynne, R. (NIH/NLM/L. [C] <wy...@ma...> - 2021-08-17 19:46:57
|
Thanks for your quick reply! My test class is attached. The error occurs with reasoner.getSubClasses(OWLClass, false) Stacktrace: Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology loadAxioms INFO: Loading 20 axioms Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology loadAxioms INFO: Processing 38 normalised axioms Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify INFO: Classifying with 8 threads Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.NormalisedOntology classify INFO: Running saturation Aug 17, 2021 2:45:39 PM au.csiro.snorocket.core.SnorocketReasoner getClassifiedOntology INFO: Building taxonomy java.lang.NullPointerException at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:40) at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) Exception in thread "main" java.lang.NullPointerException at gov.nih.nlm.mor.util.TestSnorocket.run(TestSnorocket.java:44) at gov.nih.nlm.mor.util.TestSnorocket.main(TestSnorocket.java:31) From the documentation on Github, version 3.0.0 is expected to work with OWL API 4. dependencies in pom: <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-distribution</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-core</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>au.csiro</groupId> <artifactId>snorocket-owlapi</artifactId> <version>3.0.0</version> </dependency> From an asserted view, here are screenshots from Protégé. (I can send the ontology off-list if needed.) [cid:image001.png@01D7937C.0F7DF620] [cid:image002.png@01D7937C.79C4D710] [cid:image003.png@01D7937C.79C4D710] From: Ignazio Palmisano <ipa...@gm...> Sent: Tuesday, August 17, 2021 1:20 PM To: owl...@li... Subject: Re: [OWLAPI-developer] Snorocket On Tue, 17 Aug 2021, 20:14 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...<mailto:owl...@li...>> wrote: Hi, I’m wondering if Snorocket<https://aehrc.com/snorocket/> is still available for the owlapi, and if so, what Maven dependencies should be used. I’ve tried the latest version but cannot get it to work with very simple EL2 ontologies. Hi, I can't go check snorocket right now, but I'd expect its latest version to work with the latest OWLAPI of the same major version. I think 2.0 was using OWLAPI 4? What errors are you seeing? Cheers, I. My reason for exploring Snorocket is that ELK has an issue returning equivalent classes containing DataHasValue axioms (also with simple EL2 ontologies). Regards, Robert W. Wynne Medical Ontology Research Programmer Contractor, Computational Health Research Branch National Library of Medicine _______________________________________________ Owlapi-developer mailing list Owl...@li...<mailto:Owl...@li...> https://lists.sourceforge.net/lists/listinfo/owlapi-developer |
From: Ignazio P. <ipa...@gm...> - 2021-08-17 17:20:29
|
On Tue, 17 Aug 2021, 20:14 Wynne, Robert (NIH/NLM/LHC) [C] via Owlapi-developer, <owl...@li...> wrote: > Hi, > > > > I’m wondering if Snorocket <https://aehrc.com/snorocket/> is still > available for the owlapi, and if so, what Maven dependencies should be used. > > I’ve tried the latest version but cannot get it to work with very simple > EL2 ontologies. > Hi, I can't go check snorocket right now, but I'd expect its latest version to work with the latest OWLAPI of the same major version. I think 2.0 was using OWLAPI 4? What errors are you seeing? Cheers, I. > > My reason for exploring Snorocket is that ELK has an issue returning > equivalent classes containing DataHasValue axioms (also with simple EL2 > ontologies). > > > > Regards, > > > > Robert W. Wynne > > Medical Ontology Research Programmer > > Contractor, Computational Health Research Branch > > National Library of Medicine > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Wynne, R. (NIH/NLM/L. [C] <wy...@ma...> - 2021-08-17 17:13:57
|
Hi, I'm wondering if Snorocket<https://aehrc.com/snorocket/> is still available for the owlapi, and if so, what Maven dependencies should be used. I've tried the latest version but cannot get it to work with very simple EL2 ontologies. My reason for exploring Snorocket is that ELK has an issue returning equivalent classes containing DataHasValue axioms (also with simple EL2 ontologies). Regards, Robert W. Wynne Medical Ontology Research Programmer Contractor, Computational Health Research Branch National Library of Medicine |
From: Shyama <shy...@gm...> - 2021-08-04 12:08:31
|
Hi Ignazio Thank you for your great help. Anyway, Still, I could not resolve the issue. Again I got a NULL point exception as follows, even after initializing the Supplier<OWLOntologyManager> m as you instructed. *I do not want to waste your time on my issue further, I will try with other versions. * *If there is a possibility please share with us a successful code with new versions dependencies (OWL API 5.1.17, Hermit 1.4.3.517, owlexplanation 5.0.0).* Cheers! Shyama My Code --------------------------------- OWLAxiom axT = df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLNothing()); Supplier<OWLOntologyManager> m =OWLManager::createOWLOntologyManager; InconsistentOntologyExplanationGeneratorFactory x = new InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory, df, m, 10); ExplanationGenerator<OWLAxiom> test = x.createExplanationGenerator(o); *System.out.println(test.getExplanations(axT, 10));// here exceptions triggered* -------------------------------- OUTPUT.................................. Exception in thread "main" java.lang.IllegalStateException: value cannot be null at this stage at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:56) at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:40) at uk.ac.manchester.cs.owl.explanation.ordering.ExplanationOrdererImplNoManager$SeedExtractor.getTarget(ExplanationOrdererImplNoManager.java:309) at uk.ac.manchester.cs.owl.explanation.ordering.ExplanationOrdererImplNoManager.getOrderedExplanation(ExplanationOrdererImplNoManager.java:174) at org.semanticweb.owl.explanation.api.Explanation.toString(Explanation.java:149) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuilder.append(StringBuilder.java:131) at java.util.AbstractCollection.toString(AbstractCollection.java:462) at java.lang.String.valueOf(String.java:2994) at java.io.PrintStream.println(PrintStream.java:821) at com.mycompany.owltutorial.OWLAPIFirst.main(OWLAPIFirst.java:116) Command execution failed. On Wed, Aug 4, 2021 at 2:26 PM Ignazio Palmisano < ipa...@gm...> wrote: > > > On Wed, 4 Aug 2021, 11:46 Shyama, <shy...@gm...> wrote: > >> Hi >> I am sorry to bother you again. I spent 4 hours resolving this issue. >> >> As you instructed, I tried the new version of the OWL explanation. >> However, in the new version, I have to initialize >> "Supplier<OWLOntologyManager> m = ??". I could not find, how to >> initialize "m" in here. >> > > > Hi, > Supplier<OWLOntologyManager> m = OWLManager::createOWLOntologyManager; > > will do - any implementation that provides a new manager on request is all > that's needed. This change was introduced to remove the dependency to > OWLManager. > > Cheers, > Ignazio > > > >> Thus, finally, I pass NULL for Supplier<OWLOntologyManager> m and run the >> code. Unfortunately, still, I got exceptions at the last line: >> System.out.println(x.createExplanationGenerator(o).getExplanations(axT, >> 10)); >> >> I have attached versions of the jars, and my code, and the output for >> your reference. Thanking you in advance. >> >> >> ------------------- New Project & POM dependencies----------------- >> <dependencies> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>owlapi-distribution</artifactId> >> <version>5.1.19</version> >> </dependency> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>org.semanticweb.hermit</artifactId> >> <version>1.4.3.517</version> >> </dependency> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>owlexplanation</artifactId> >> <version>5.0.0</version> >> </dependency> >> ------------------------------- >> >> ---------------------my Code----------------------- >> public static void main(String[] args) throws IOException, >> OWLOntologyCreationException { >> Supplier<OWLOntologyManager> m =null; >> >> System.out.println("OWL API Versions......................."); >> >> System.out.println(System.getProperty("java.class.path")); >> >> System.out.println("My Code Results......................."); >> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >> >> IRI IOR = IRI.create(" >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >> >> OWLOntology o; >> >> o = man.createOntology(IOR); >> OWLDataFactory df = >> o.getOWLOntologyManager().getOWLDataFactory(); >> >> >> OWLClass A = df.getOWLClass(IOR + "#A"); >> OWLClass B = df.getOWLClass(IOR + "#B"); >> OWLClass X = df.getOWLClass(IOR + "#X"); >> OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); >> OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); >> OWLSubClassOfAxiom ax = >> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >> df.getOWLObjectSomeValuesFrom(S, B)); >> o.add(ax); >> >> OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR >> + "#hasValue"); >> OWLDeclarationAxiom d_hasValue = >> df.getOWLDeclarationAxiom(hasValue); >> o.add(d_hasValue); >> >> // create an inconsistent ontology by declaring an >> individual member of two disjoint classes >> OWLIndividual i = df.getOWLNamedIndividual(IOR + >> "#testInv"); >> OWLDisjointClassesAxiom ax2 = >> df.getOWLDisjointClassesAxiom(A, B); >> o.add(ax2 ); >> o.add(df.getOWLClassAssertionAxiom(A, i)); >> o.add( df.getOWLClassAssertionAxiom(B, i)); >> >> System.out.println(o); >> >> OWLReasonerFactory hermitreasonerFactory = new >> ReasonerFactory(); >> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >> >> System.out.println("check consistency: "+ r.isConsistent()); >> >> OWLAxiom axT = df.getOWLSubClassOfAxiom(df.getOWLThing(), >> df.getOWLNothing()); >> InconsistentOntologyExplanationGeneratorFactory x = new >> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory, df, >> m, 10); >> >> System.out.println(x.createExplanationGenerator(o).getExplanations(axT, >> 10)); >> >> } >> -------------------------------------- >> >> >> -----------------------OUTPUT--------------------- >> OWL API Versions....................... >> C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.19\owlapi-distribution-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.19\owlapi-compatibility-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.19\owlapi-apibinding-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.19\owlapi-impl-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.19\owlapi-oboformat-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.19\owlapi-rio-5.1.19.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.8\jackson-databind-2.9.10.8.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.12\httpcore-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-toSLF4J: >> Failed to load class "org.slf4j.impl.StaticLoggerBinder". >> SLF4J: Defaulting to no-operation (NOP) logger implementation >> -avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\SLF4J: >> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further >> details. >> >> j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.7\commons-io-2.7.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\5.0.0\owlexplanation-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.19\owlapi-api-5.1.19.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.19\owlapi-tools-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\5.0.0\telemetry-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.19\owlapi-parsers-5.1.19.jar >> My Code Results....................... >> Ontology(OntologyID(OntologyIRI(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) >> VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: >> {ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >> SubClassOf(ObjectSomeValuesFrom(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) >> ObjectSomeValuesFrom(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) >> DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) >> Declaration(ObjectProperty(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) } >> check consistency: false >> Exception in thread "main" java.lang.NullPointerException >> at >> org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:116) >> at >> org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:45) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:262) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:183) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:292) >> at >> org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:110) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:118) >> at >> com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:92) >> Command execution failed. >> org.apache.commons.exec.ExecuteException: Process exited with an error: 1 >> (Exit value: 1) >> at org.apache.commons.exec.DefaultExecutor.executeInternal >> (DefaultExecutor.java:404) >> -------------------------------------------------- >> >> >> On Wed, Aug 4, 2021 at 9:41 AM Ignazio Palmisano < >> ipa...@gm...> wrote: >> >>> >>> >>> On Wed, 4 Aug 2021, 05:56 Shyama, <shy...@gm...> wrote: >>> >>>> Hi >>>> >>>> Please find the result of that code.......... >>>> >>> >>> >>> Thanks, that revealed the guilty jar: >>> >>> C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi- >>> osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar >>> >>> I'm guessing this might be coming in via version 2.0.0 of the >>> explanation library. Try version 5.0.0 instead. >>> Maven should have spotted the conflict and resolved to the latest >>> version, but there's a possibility that would not have worked either. >>> Version 5 should solve the issue cleanly. >>> >>> Cheers, >>> I. >>> >>> >>> ---------------------------------------------------- >>>> OWL API Versions....................... >>>> C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: >>>> Failed to load class "org.slf4j.impl.StaticLoggerBinder". >>>> SLF4J: Defaulting to no-operation (NOP) logger implementation >>>> 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: >>>> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further >>>> details. >>>> >>>> manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar >>>> My Code Results....................... >>>> Ontology(OntologyID(OntologyIRI(< >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) >>>> VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: >>>> {Declaration(ObjectProperty(< >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) >>>> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >>>> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >>>> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> >>>> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >>>> DisjointClasses(< >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) >>>> SubClassOf(ObjectSomeValuesFrom(< >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) >>>> ObjectSomeValuesFrom(< >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } >>>> >>>> check consistency: false >>>> >>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) >>>> at >>>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) >>>> at >>>> com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) >>>> Command execution failed. >>>> org.apache.commons.exec.ExecuteException: Process exited with an error: >>>> 1 (Exit value: 1) >>>> at org.apache.commons.exec.DefaultExecutor.executeInternal >>>> (DefaultExecutor.java:404) >>>> at org.apache.commons.exec.DefaultExecutor.execute >>>> (DefaultExecutor.java:166) >>>> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >>>> (ExecMojo.java:982) >>>> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >>>> (ExecMojo.java:929) >>>> at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) >>>> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo >>>> (DefaultBuildPluginManager.java:137) >>>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>>> (MojoExecutor.java:210) >>>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>>> (MojoExecutor.java:156) >>>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>>> (MojoExecutor.java:148) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >>>> (LifecycleModuleBuilder.java:117) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >>>> (LifecycleModuleBuilder.java:81) >>>> at >>>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build >>>> (SingleThreadedBuilder.java:56) >>>> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute >>>> (LifecycleStarter.java:128) >>>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) >>>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) >>>> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) >>>> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) >>>> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) >>>> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke >>>> (NativeMethodAccessorImpl.java:62) >>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke >>>> (DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke (Method.java:498) >>>> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced >>>> (Launcher.java:282) >>>> at org.codehaus.plexus.classworlds.launcher.Launcher.launch >>>> (Launcher.java:225) >>>> at >>>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode >>>> (Launcher.java:406) >>>> at org.codehaus.plexus.classworlds.launcher.Launcher.main >>>> (Launcher.java:347) >>>> --------------------------------------------------- >>>> >>>> >>>> My Test Example code----------------------------------------- >>>> >>>> public class OWLExplainationTest { >>>> public static void main(String[] args) throws IOException, >>>> OWLOntologyCreationException { >>>> >>>> System.out.println("OWL API Versions......................."); >>>> >>>> System.out.println(System.getProperty("java.class.path")); >>>> >>>> System.out.println("My Code Results......................."); >>>> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >>>> >>>> IRI IOR = IRI.create(" >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>> >>>> OWLOntology o; >>>> >>>> o = man.createOntology(IOR); >>>> OWLDataFactory df = >>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>> >>>> >>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); >>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); >>>> OWLSubClassOfAxiom ax = >>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>> o.add(ax); >>>> >>>> OWLObjectProperty hasValue = >>>> df.getOWLObjectProperty(IOR + "#hasValue"); >>>> OWLDeclarationAxiom d_hasValue = >>>> df.getOWLDeclarationAxiom(hasValue); >>>> o.add(d_hasValue); >>>> >>>> // create an inconsistent ontology by declaring an >>>> individual member of two disjoint classes >>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>> "#testInv"); >>>> OWLDisjointClassesAxiom ax2 = >>>> df.getOWLDisjointClassesAxiom(A, B); >>>> o.add(ax2 ); >>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>> o.add( df.getOWLClassAssertionAxiom(B, i)); >>>> >>>> System.out.println(o); >>>> >>>> OWLReasonerFactory hermitreasonerFactory = new >>>> Reasoner.ReasonerFactory(); >>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>> >>>> System.out.println("check consistency: "+ r.isConsistent()); >>>> >>>> //create the explanation generator --- this code is not >>>> working.............. >>>> ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>> //Ask for an explanation of `Thing subclass of Nothing` - this >>>> axiom is entailed in any inconsistent ontology >>>> Set<Explanation<OWLAxiom>> explanations = >>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>> .getOWLThing(), df.getOWLNothing())); >>>> System.out.println("TestExplanation.main() " + explanations); >>>> >>>> } >>>> >>>> >>>> -------------------------------------- >>>> >>>> On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < >>>> ipa...@gm...> wrote: >>>> >>>>> >>>>> >>>>> On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: >>>>> >>>>>> Thank You very much for your prompt reply >>>>>> >>>>>> I used the below dependencies only. Please kindly let me know still I >>>>>> have version issue with regards to my issue. >>>>>> >>>>>> <dependencies> >>>>>> <dependency> >>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>> <artifactId>owlapi-distribution</artifactId> >>>>>> <version>5.1.17</version> >>>>>> </dependency> >>>>>> <dependency> >>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>> <artifactId>org.semanticweb.hermit</artifactId> >>>>>> <version>1.4.3.517</version> >>>>>> </dependency> >>>>>> <dependency> >>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>> <artifactId>owlexplanation</artifactId> >>>>>> <version>2.0.0</version> >>>>>> <type>jar</type> >>>>>> </dependency> >>>>>> >>>>>> >>>>> >>>>> These look correct. >>>>> Can you add this as first line to your Java code and post back the >>>>> result? >>>>> >>>>> System.out.println(System.getProperty("java.class.path")); >>>>> >>>>> Cheers, >>>>> Ignazio >>>>> >>>>> >>>>>> ------------------ >>>>>> >>>>>> Cheers! >>>>>> >>>>>> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >>>>>> ipa...@gm...> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>>>>>> >>>>>>>> HI >>>>>>>> >>>>>>>> Could Anyone please kindly assists me to resolve this issue. >>>>>>>> >>>>>>>> I have written a code to test an inconsistency Explanation. The >>>>>>>> code does not show any syntax error, but it got exceptions while running >>>>>>>> the code as follows; For your information, the code and the OWL explanation >>>>>>>> dependency are attached at the end. >>>>>>>> ------------------------------------------- >>>>>>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>>>>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>>>>>> >>>>>>> -------------------------------------------- >>>>>>>> >>>>>>>> Used HermiT reasoner >>>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi, >>>>>>> Which version of HermiT? >>>>>>> >>>>>>> The stack trace is typical of situations where two versions of >>>>>>> OWLAPI are on the classpath, and old versions of HermiT (1.3.8, for >>>>>>> example) include the OWLAPI classes in the HermiT jar, making it very hard >>>>>>> to use with newer libraries. At compile time this goes unnoticed because >>>>>>> classpath order differs. >>>>>>> >>>>>>> Cheers, >>>>>>> Ignazio >>>>>>> >>>>>>> >>>>>>>> Dependency used >>>>>>>> --------------------- >>>>>>>> <dependency> >>>>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>>>> <artifactId>owlexplanation</artifactId> >>>>>>>> <version>2.0.0</version> >>>>>>>> <type>jar</type> >>>>>>>> </dependency> >>>>>>>> ------------------------------- >>>>>>>> >>>>>>>> *code Snippet* >>>>>>>> >>>>>>>> public static void main(String[] args) throws IOException, >>>>>>>> OWLOntologyCreationException { >>>>>>>> OWLOntologyManager man = >>>>>>>> OWLManager.createOWLOntologyManager(); >>>>>>>> IRI IOR = IRI.create(" >>>>>>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>>>>>> >>>>>>>> OWLOntology o; >>>>>>>> >>>>>>>> >>>>>>>> o = man.createOntology(IOR); >>>>>>>> OWLDataFactory df = >>>>>>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>>>>>> >>>>>>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>>>>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>>>>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>>>>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + >>>>>>>> "#R"); >>>>>>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + >>>>>>>> "#S"); >>>>>>>> OWLSubClassOfAxiom ax = >>>>>>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>>>>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>>>>>> o.add(ax); >>>>>>>> >>>>>>>> // create an inconsistent ontology by declaring an >>>>>>>> individual member of two disjoint classes >>>>>>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>>>>>> "#testInv"); >>>>>>>> OWLDisjointClassesAxiom ax2 = >>>>>>>> df.getOWLDisjointClassesAxiom(A, B); >>>>>>>> o.add(ax2 ); >>>>>>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>>>>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>>>>>> >>>>>>>> OWLReasonerFactory hermitreasonerFactory = new >>>>>>>> ReasonerFactory(); >>>>>>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>>>>>> >>>>>>>> System.out.println("check consistency"+ >>>>>>>> r.isConsistent()); >>>>>>>> >>>>>>>> //create the explanation generator --- this code is not >>>>>>>> working.............. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>>>>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>>>>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>>>>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>>>>>> explanations = >>>>>>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>>>>>> .getOWLThing(), df.getOWLNothing())); >>>>>>>> System.out.println("TestExplanation.main() " + explanations);* >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> Cheers! >>>>>>>> >>>>>>>> -- >>>>>>>> Shyama Wilson >>>>>>>> Department of Computer Science and Informatics >>>>>>>> Uva Wellassa University: www.uwu.ac.lk >>>>>>>> Badulla, Sri Lanka >>>>>>>> email: sh...@uw... <am...@uw...> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Owlapi-developer mailing list >>>>>>>> Owl...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Owlapi-developer mailing list >>>>>>> Owl...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Department of Computer Science and Informatics >>>>>> Faculty of Applied Sciences >>>>>> Uva Wellassa University >>>>>> Badulla >>>>>> _______________________________________________ >>>>>> Owlapi-developer mailing list >>>>>> Owl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>> >>>>> _______________________________________________ >>>>> Owlapi-developer mailing list >>>>> Owl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>> >>>> >>>> >>>> -- >>>> Shyama Wilson >>>> Department of Computer Science and Informatics >>>> Uva Wellassa University: www.uwu.ac.lk >>>> Badulla, Sri Lanka >>>> email: sh...@uw... <am...@uw...> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> >> >> -- >> Shyama Wilson >> Department of Computer Science and Informatics >> Uva Wellassa University: www.uwu.ac.lk >> Badulla, Sri Lanka >> email: sh...@uw... <am...@uw...> >> >> >> >> >> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > -- Shyama Wilson Department of Computer Science and Informatics Uva Wellassa University: www.uwu.ac.lk Badulla, Sri Lanka email: sh...@uw... <am...@uw...> |
From: Ignazio P. <ipa...@gm...> - 2021-08-04 08:55:57
|
On Wed, 4 Aug 2021, 11:46 Shyama, <shy...@gm...> wrote: > Hi > I am sorry to bother you again. I spent 4 hours resolving this issue. > > As you instructed, I tried the new version of the OWL explanation. > However, in the new version, I have to initialize > "Supplier<OWLOntologyManager> m = ??". I could not find, how to > initialize "m" in here. > Hi, Supplier<OWLOntologyManager> m = OWLManager::createOWLOntologyManager; will do - any implementation that provides a new manager on request is all that's needed. This change was introduced to remove the dependency to OWLManager. Cheers, Ignazio > Thus, finally, I pass NULL for Supplier<OWLOntologyManager> m and run the > code. Unfortunately, still, I got exceptions at the last line: > System.out.println(x.createExplanationGenerator(o).getExplanations(axT, > 10)); > > I have attached versions of the jars, and my code, and the output for your > reference. Thanking you in advance. > > > ------------------- New Project & POM dependencies----------------- > <dependencies> > <dependency> > <groupId>net.sourceforge.owlapi</groupId> > <artifactId>owlapi-distribution</artifactId> > <version>5.1.19</version> > </dependency> > <dependency> > <groupId>net.sourceforge.owlapi</groupId> > <artifactId>org.semanticweb.hermit</artifactId> > <version>1.4.3.517</version> > </dependency> > <dependency> > <groupId>net.sourceforge.owlapi</groupId> > <artifactId>owlexplanation</artifactId> > <version>5.0.0</version> > </dependency> > ------------------------------- > > ---------------------my Code----------------------- > public static void main(String[] args) throws IOException, > OWLOntologyCreationException { > Supplier<OWLOntologyManager> m =null; > > System.out.println("OWL API Versions......................."); > > System.out.println(System.getProperty("java.class.path")); > > System.out.println("My Code Results......................."); > OWLOntologyManager man = OWLManager.createOWLOntologyManager(); > > IRI IOR = IRI.create(" > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); > > OWLOntology o; > > o = man.createOntology(IOR); > OWLDataFactory df = > o.getOWLOntologyManager().getOWLDataFactory(); > > > OWLClass A = df.getOWLClass(IOR + "#A"); > OWLClass B = df.getOWLClass(IOR + "#B"); > OWLClass X = df.getOWLClass(IOR + "#X"); > OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); > OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); > OWLSubClassOfAxiom ax = > df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), > df.getOWLObjectSomeValuesFrom(S, B)); > o.add(ax); > > OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + > "#hasValue"); > OWLDeclarationAxiom d_hasValue = > df.getOWLDeclarationAxiom(hasValue); > o.add(d_hasValue); > > // create an inconsistent ontology by declaring an individual > member of two disjoint classes > OWLIndividual i = df.getOWLNamedIndividual(IOR + > "#testInv"); > OWLDisjointClassesAxiom ax2 = > df.getOWLDisjointClassesAxiom(A, B); > o.add(ax2 ); > o.add(df.getOWLClassAssertionAxiom(A, i)); > o.add( df.getOWLClassAssertionAxiom(B, i)); > > System.out.println(o); > > OWLReasonerFactory hermitreasonerFactory = new > ReasonerFactory(); > OWLReasoner r = hermitreasonerFactory.createReasoner(o); > > System.out.println("check consistency: "+ r.isConsistent()); > > OWLAxiom axT = df.getOWLSubClassOfAxiom(df.getOWLThing(), > df.getOWLNothing()); > InconsistentOntologyExplanationGeneratorFactory x = new > InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory, df, > m, 10); > > System.out.println(x.createExplanationGenerator(o).getExplanations(axT, > 10)); > > } > -------------------------------------- > > > -----------------------OUTPUT--------------------- > OWL API Versions....................... > C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.19\owlapi-distribution-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.19\owlapi-compatibility-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.19\owlapi-apibinding-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.19\owlapi-impl-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.19\owlapi-oboformat-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.19\owlapi-rio-5.1.19.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.8\jackson-databind-2.9.10.8.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.12\httpcore-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-toSLF4J: > Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > -avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\SLF4J: > See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > > j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.7\commons-io-2.7.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\5.0.0\owlexplanation-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.19\owlapi-api-5.1.19.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.19\owlapi-tools-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\5.0.0\telemetry-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.19\owlapi-parsers-5.1.19.jar > My Code Results....................... > Ontology(OntologyID(OntologyIRI(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) > VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: > {ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> > <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > SubClassOf(ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) > ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) > DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> > <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) > Declaration(ObjectProperty(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) } > check consistency: false > Exception in thread "main" java.lang.NullPointerException > at > org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:116) > at > org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:45) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:262) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:183) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:292) > at > org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:110) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:118) > at > com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:92) > Command execution failed. > org.apache.commons.exec.ExecuteException: Process exited with an error: 1 > (Exit value: 1) > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > -------------------------------------------------- > > > On Wed, Aug 4, 2021 at 9:41 AM Ignazio Palmisano < > ipa...@gm...> wrote: > >> >> >> On Wed, 4 Aug 2021, 05:56 Shyama, <shy...@gm...> wrote: >> >>> Hi >>> >>> Please find the result of that code.......... >>> >> >> >> Thanks, that revealed the guilty jar: >> >> C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi- >> osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar >> >> I'm guessing this might be coming in via version 2.0.0 of the explanation >> library. Try version 5.0.0 instead. >> Maven should have spotted the conflict and resolved to the latest >> version, but there's a possibility that would not have worked either. >> Version 5 should solve the issue cleanly. >> >> Cheers, >> I. >> >> >> ---------------------------------------------------- >>> OWL API Versions....................... >>> C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: >>> Failed to load class "org.slf4j.impl.StaticLoggerBinder". >>> SLF4J: Defaulting to no-operation (NOP) logger implementation >>> 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: >>> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further >>> details. >>> >>> manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar >>> My Code Results....................... >>> Ontology(OntologyID(OntologyIRI(< >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) >>> VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: >>> {Declaration(ObjectProperty(< >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) >>> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >>> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >>> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> >>> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >>> DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >>> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) >>> SubClassOf(ObjectSomeValuesFrom(< >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) >>> ObjectSomeValuesFrom(< >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } >>> >>> check consistency: false >>> >>> Exception in thread "main" java.lang.NoSuchMethodError: >>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) >>> at >>> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) >>> at >>> com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) >>> Command execution failed. >>> org.apache.commons.exec.ExecuteException: Process exited with an error: >>> 1 (Exit value: 1) >>> at org.apache.commons.exec.DefaultExecutor.executeInternal >>> (DefaultExecutor.java:404) >>> at org.apache.commons.exec.DefaultExecutor.execute >>> (DefaultExecutor.java:166) >>> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >>> (ExecMojo.java:982) >>> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >>> (ExecMojo.java:929) >>> at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) >>> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo >>> (DefaultBuildPluginManager.java:137) >>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>> (MojoExecutor.java:210) >>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>> (MojoExecutor.java:156) >>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >>> (MojoExecutor.java:148) >>> at >>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >>> (LifecycleModuleBuilder.java:117) >>> at >>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >>> (LifecycleModuleBuilder.java:81) >>> at >>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build >>> (SingleThreadedBuilder.java:56) >>> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute >>> (LifecycleStarter.java:128) >>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) >>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) >>> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) >>> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) >>> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) >>> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) >>> at sun.reflect.NativeMethodAccessorImpl.invoke >>> (NativeMethodAccessorImpl.java:62) >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke >>> (DelegatingMethodAccessorImpl.java:43) >>> at java.lang.reflect.Method.invoke (Method.java:498) >>> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced >>> (Launcher.java:282) >>> at org.codehaus.plexus.classworlds.launcher.Launcher.launch >>> (Launcher.java:225) >>> at >>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode >>> (Launcher.java:406) >>> at org.codehaus.plexus.classworlds.launcher.Launcher.main >>> (Launcher.java:347) >>> --------------------------------------------------- >>> >>> >>> My Test Example code----------------------------------------- >>> >>> public class OWLExplainationTest { >>> public static void main(String[] args) throws IOException, >>> OWLOntologyCreationException { >>> >>> System.out.println("OWL API Versions......................."); >>> >>> System.out.println(System.getProperty("java.class.path")); >>> >>> System.out.println("My Code Results......................."); >>> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >>> >>> IRI IOR = IRI.create(" >>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>> >>> OWLOntology o; >>> >>> o = man.createOntology(IOR); >>> OWLDataFactory df = >>> o.getOWLOntologyManager().getOWLDataFactory(); >>> >>> >>> OWLClass A = df.getOWLClass(IOR + "#A"); >>> OWLClass B = df.getOWLClass(IOR + "#B"); >>> OWLClass X = df.getOWLClass(IOR + "#X"); >>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); >>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); >>> OWLSubClassOfAxiom ax = >>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>> df.getOWLObjectSomeValuesFrom(S, B)); >>> o.add(ax); >>> >>> OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR >>> + "#hasValue"); >>> OWLDeclarationAxiom d_hasValue = >>> df.getOWLDeclarationAxiom(hasValue); >>> o.add(d_hasValue); >>> >>> // create an inconsistent ontology by declaring an >>> individual member of two disjoint classes >>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>> "#testInv"); >>> OWLDisjointClassesAxiom ax2 = >>> df.getOWLDisjointClassesAxiom(A, B); >>> o.add(ax2 ); >>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>> o.add( df.getOWLClassAssertionAxiom(B, i)); >>> >>> System.out.println(o); >>> >>> OWLReasonerFactory hermitreasonerFactory = new >>> Reasoner.ReasonerFactory(); >>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>> >>> System.out.println("check consistency: "+ r.isConsistent()); >>> >>> //create the explanation generator --- this code is not >>> working.............. >>> ExplanationGenerator<OWLAxiom> explainInconsistency = new >>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>> //Ask for an explanation of `Thing subclass of Nothing` - this >>> axiom is entailed in any inconsistent ontology >>> Set<Explanation<OWLAxiom>> explanations = >>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>> .getOWLThing(), df.getOWLNothing())); >>> System.out.println("TestExplanation.main() " + explanations); >>> >>> } >>> >>> >>> -------------------------------------- >>> >>> On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < >>> ipa...@gm...> wrote: >>> >>>> >>>> >>>> On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: >>>> >>>>> Thank You very much for your prompt reply >>>>> >>>>> I used the below dependencies only. Please kindly let me know still I >>>>> have version issue with regards to my issue. >>>>> >>>>> <dependencies> >>>>> <dependency> >>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>> <artifactId>owlapi-distribution</artifactId> >>>>> <version>5.1.17</version> >>>>> </dependency> >>>>> <dependency> >>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>> <artifactId>org.semanticweb.hermit</artifactId> >>>>> <version>1.4.3.517</version> >>>>> </dependency> >>>>> <dependency> >>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>> <artifactId>owlexplanation</artifactId> >>>>> <version>2.0.0</version> >>>>> <type>jar</type> >>>>> </dependency> >>>>> >>>>> >>>> >>>> These look correct. >>>> Can you add this as first line to your Java code and post back the >>>> result? >>>> >>>> System.out.println(System.getProperty("java.class.path")); >>>> >>>> Cheers, >>>> Ignazio >>>> >>>> >>>>> ------------------ >>>>> >>>>> Cheers! >>>>> >>>>> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >>>>> ipa...@gm...> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>>>>> >>>>>>> HI >>>>>>> >>>>>>> Could Anyone please kindly assists me to resolve this issue. >>>>>>> >>>>>>> I have written a code to test an inconsistency Explanation. The >>>>>>> code does not show any syntax error, but it got exceptions while running >>>>>>> the code as follows; For your information, the code and the OWL explanation >>>>>>> dependency are attached at the end. >>>>>>> ------------------------------------------- >>>>>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>>>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>>>>> >>>>>> -------------------------------------------- >>>>>>> >>>>>>> Used HermiT reasoner >>>>>>> >>>>>> >>>>>> >>>>>> Hi, >>>>>> Which version of HermiT? >>>>>> >>>>>> The stack trace is typical of situations where two versions of OWLAPI >>>>>> are on the classpath, and old versions of HermiT (1.3.8, for example) >>>>>> include the OWLAPI classes in the HermiT jar, making it very hard to use >>>>>> with newer libraries. At compile time this goes unnoticed because classpath >>>>>> order differs. >>>>>> >>>>>> Cheers, >>>>>> Ignazio >>>>>> >>>>>> >>>>>>> Dependency used >>>>>>> --------------------- >>>>>>> <dependency> >>>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>>> <artifactId>owlexplanation</artifactId> >>>>>>> <version>2.0.0</version> >>>>>>> <type>jar</type> >>>>>>> </dependency> >>>>>>> ------------------------------- >>>>>>> >>>>>>> *code Snippet* >>>>>>> >>>>>>> public static void main(String[] args) throws IOException, >>>>>>> OWLOntologyCreationException { >>>>>>> OWLOntologyManager man = >>>>>>> OWLManager.createOWLOntologyManager(); >>>>>>> IRI IOR = IRI.create(" >>>>>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>>>>> >>>>>>> OWLOntology o; >>>>>>> >>>>>>> >>>>>>> o = man.createOntology(IOR); >>>>>>> OWLDataFactory df = >>>>>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>>>>> >>>>>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>>>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>>>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>>>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + >>>>>>> "#R"); >>>>>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + >>>>>>> "#S"); >>>>>>> OWLSubClassOfAxiom ax = >>>>>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>>>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>>>>> o.add(ax); >>>>>>> >>>>>>> // create an inconsistent ontology by declaring an >>>>>>> individual member of two disjoint classes >>>>>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>>>>> "#testInv"); >>>>>>> OWLDisjointClassesAxiom ax2 = >>>>>>> df.getOWLDisjointClassesAxiom(A, B); >>>>>>> o.add(ax2 ); >>>>>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>>>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>>>>> >>>>>>> OWLReasonerFactory hermitreasonerFactory = new >>>>>>> ReasonerFactory(); >>>>>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>>>>> >>>>>>> System.out.println("check consistency"+ >>>>>>> r.isConsistent()); >>>>>>> >>>>>>> //create the explanation generator --- this code is not >>>>>>> working.............. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>>>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>>>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>>>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>>>>> explanations = >>>>>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>>>>> .getOWLThing(), df.getOWLNothing())); >>>>>>> System.out.println("TestExplanation.main() " + explanations);* >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> Cheers! >>>>>>> >>>>>>> -- >>>>>>> Shyama Wilson >>>>>>> Department of Computer Science and Informatics >>>>>>> Uva Wellassa University: www.uwu.ac.lk >>>>>>> Badulla, Sri Lanka >>>>>>> email: sh...@uw... <am...@uw...> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Owlapi-developer mailing list >>>>>>> Owl...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>>> >>>>>> _______________________________________________ >>>>>> Owlapi-developer mailing list >>>>>> Owl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>> >>>>> >>>>> >>>>> -- >>>>> Department of Computer Science and Informatics >>>>> Faculty of Applied Sciences >>>>> Uva Wellassa University >>>>> Badulla >>>>> _______________________________________________ >>>>> Owlapi-developer mailing list >>>>> Owl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>> >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> >>> >>> -- >>> Shyama Wilson >>> Department of Computer Science and Informatics >>> Uva Wellassa University: www.uwu.ac.lk >>> Badulla, Sri Lanka >>> email: sh...@uw... <am...@uw...> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > > > -- > Shyama Wilson > Department of Computer Science and Informatics > Uva Wellassa University: www.uwu.ac.lk > Badulla, Sri Lanka > email: sh...@uw... <am...@uw...> > > > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Shyama <shy...@gm...> - 2021-08-04 08:46:17
|
Hi I am sorry to bother you again. I spent 4 hours resolving this issue. As you instructed, I tried the new version of the OWL explanation. However, in the new version, I have to initialize "Supplier<OWLOntologyManager> m = ??". I could not find, how to initialize "m" in here. Thus, finally, I pass NULL for Supplier<OWLOntologyManager> m and run the code. Unfortunately, still, I got exceptions at the last line: System.out.println(x.createExplanationGenerator(o).getExplanations(axT, 10)); I have attached versions of the jars, and my code, and the output for your reference. Thanking you in advance. ------------------- New Project & POM dependencies----------------- <dependencies> <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-distribution</artifactId> <version>5.1.19</version> </dependency> <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>org.semanticweb.hermit</artifactId> <version>1.4.3.517</version> </dependency> <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlexplanation</artifactId> <version>5.0.0</version> </dependency> ------------------------------- ---------------------my Code----------------------- public static void main(String[] args) throws IOException, OWLOntologyCreationException { Supplier<OWLOntologyManager> m =null; System.out.println("OWL API Versions......................."); System.out.println(System.getProperty("java.class.path")); System.out.println("My Code Results......................."); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); IRI IOR = IRI.create(" http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); OWLOntology o; o = man.createOntology(IOR); OWLDataFactory df = o.getOWLOntologyManager().getOWLDataFactory(); OWLClass A = df.getOWLClass(IOR + "#A"); OWLClass B = df.getOWLClass(IOR + "#B"); OWLClass X = df.getOWLClass(IOR + "#X"); OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); OWLSubClassOfAxiom ax = df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), df.getOWLObjectSomeValuesFrom(S, B)); o.add(ax); OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + "#hasValue"); OWLDeclarationAxiom d_hasValue = df.getOWLDeclarationAxiom(hasValue); o.add(d_hasValue); // create an inconsistent ontology by declaring an individual member of two disjoint classes OWLIndividual i = df.getOWLNamedIndividual(IOR + "#testInv"); OWLDisjointClassesAxiom ax2 = df.getOWLDisjointClassesAxiom(A, B); o.add(ax2 ); o.add(df.getOWLClassAssertionAxiom(A, i)); o.add( df.getOWLClassAssertionAxiom(B, i)); System.out.println(o); OWLReasonerFactory hermitreasonerFactory = new ReasonerFactory(); OWLReasoner r = hermitreasonerFactory.createReasoner(o); System.out.println("check consistency: "+ r.isConsistent()); OWLAxiom axT = df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLNothing()); InconsistentOntologyExplanationGeneratorFactory x = new InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory, df, m, 10); System.out.println(x.createExplanationGenerator(o).getExplanations(axT, 10)); } -------------------------------------- -----------------------OUTPUT--------------------- OWL API Versions....................... C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.19\owlapi-distribution-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.19\owlapi-compatibility-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.19\owlapi-apibinding-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.19\owlapi-impl-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.19\owlapi-oboformat-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.19\owlapi-rio-5.1.19.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.8\jackson-databind-2.9.10.8.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.12\httpcore-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-toSLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation -avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.7\commons-io-2.7.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\5.0.0\owlexplanation-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.19\owlapi-api-5.1.19.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.19\owlapi-tools-5.1.19.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\5.0.0\telemetry-5.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.19\owlapi-parsers-5.1.19.jar My Code Results....................... Ontology(OntologyID(OntologyIRI(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: {ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) SubClassOf(ObjectSomeValuesFrom(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) ObjectSomeValuesFrom(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) DisjointClasses(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) Declaration(ObjectProperty(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) } check consistency: false Exception in thread "main" java.lang.NullPointerException at org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:116) at org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:45) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:262) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:183) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:292) at org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:110) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:118) at com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:92) Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) -------------------------------------------------- On Wed, Aug 4, 2021 at 9:41 AM Ignazio Palmisano < ipa...@gm...> wrote: > > > On Wed, 4 Aug 2021, 05:56 Shyama, <shy...@gm...> wrote: > >> Hi >> >> Please find the result of that code.......... >> > > > Thanks, that revealed the guilty jar: > > C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi- > osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar > > I'm guessing this might be coming in via version 2.0.0 of the explanation > library. Try version 5.0.0 instead. > Maven should have spotted the conflict and resolved to the latest version, > but there's a possibility that would not have worked either. Version 5 > should solve the issue cleanly. > > Cheers, > I. > > > ---------------------------------------------------- >> OWL API Versions....................... >> C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: >> Failed to load class "org.slf4j.impl.StaticLoggerBinder". >> SLF4J: Defaulting to no-operation (NOP) logger implementation >> 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: >> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further >> details. >> >> manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar >> My Code Results....................... >> Ontology(OntologyID(OntologyIRI(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) >> VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: >> {Declaration(ObjectProperty(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) >> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >> ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) >> DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> >> <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) >> SubClassOf(ObjectSomeValuesFrom(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) >> ObjectSomeValuesFrom(< >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } >> >> check consistency: false >> >> Exception in thread "main" java.lang.NoSuchMethodError: >> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >> at >> org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) >> at >> org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) >> at >> org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) >> at >> org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) >> at >> com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) >> Command execution failed. >> org.apache.commons.exec.ExecuteException: Process exited with an error: 1 >> (Exit value: 1) >> at org.apache.commons.exec.DefaultExecutor.executeInternal >> (DefaultExecutor.java:404) >> at org.apache.commons.exec.DefaultExecutor.execute >> (DefaultExecutor.java:166) >> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >> (ExecMojo.java:982) >> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine >> (ExecMojo.java:929) >> at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) >> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo >> (DefaultBuildPluginManager.java:137) >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >> (MojoExecutor.java:210) >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >> (MojoExecutor.java:156) >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute >> (MojoExecutor.java:148) >> at >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >> (LifecycleModuleBuilder.java:117) >> at >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject >> (LifecycleModuleBuilder.java:81) >> at >> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build >> (SingleThreadedBuilder.java:56) >> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute >> (LifecycleStarter.java:128) >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) >> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) >> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) >> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) >> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) >> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke >> (NativeMethodAccessorImpl.java:62) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke >> (DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke (Method.java:498) >> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced >> (Launcher.java:282) >> at org.codehaus.plexus.classworlds.launcher.Launcher.launch >> (Launcher.java:225) >> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode >> (Launcher.java:406) >> at org.codehaus.plexus.classworlds.launcher.Launcher.main >> (Launcher.java:347) >> --------------------------------------------------- >> >> >> My Test Example code----------------------------------------- >> >> public class OWLExplainationTest { >> public static void main(String[] args) throws IOException, >> OWLOntologyCreationException { >> >> System.out.println("OWL API Versions......................."); >> >> System.out.println(System.getProperty("java.class.path")); >> >> System.out.println("My Code Results......................."); >> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >> >> IRI IOR = IRI.create(" >> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >> >> OWLOntology o; >> >> o = man.createOntology(IOR); >> OWLDataFactory df = >> o.getOWLOntologyManager().getOWLDataFactory(); >> >> >> OWLClass A = df.getOWLClass(IOR + "#A"); >> OWLClass B = df.getOWLClass(IOR + "#B"); >> OWLClass X = df.getOWLClass(IOR + "#X"); >> OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); >> OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); >> OWLSubClassOfAxiom ax = >> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >> df.getOWLObjectSomeValuesFrom(S, B)); >> o.add(ax); >> >> OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR >> + "#hasValue"); >> OWLDeclarationAxiom d_hasValue = >> df.getOWLDeclarationAxiom(hasValue); >> o.add(d_hasValue); >> >> // create an inconsistent ontology by declaring an >> individual member of two disjoint classes >> OWLIndividual i = df.getOWLNamedIndividual(IOR + >> "#testInv"); >> OWLDisjointClassesAxiom ax2 = >> df.getOWLDisjointClassesAxiom(A, B); >> o.add(ax2 ); >> o.add(df.getOWLClassAssertionAxiom(A, i)); >> o.add( df.getOWLClassAssertionAxiom(B, i)); >> >> System.out.println(o); >> >> OWLReasonerFactory hermitreasonerFactory = new >> Reasoner.ReasonerFactory(); >> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >> >> System.out.println("check consistency: "+ r.isConsistent()); >> >> //create the explanation generator --- this code is not >> working.............. >> ExplanationGenerator<OWLAxiom> explainInconsistency = new >> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >> //Ask for an explanation of `Thing subclass of Nothing` - this axiom >> is entailed in any inconsistent ontology >> Set<Explanation<OWLAxiom>> explanations = >> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >> .getOWLThing(), df.getOWLNothing())); >> System.out.println("TestExplanation.main() " + explanations); >> >> } >> >> >> -------------------------------------- >> >> On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < >> ipa...@gm...> wrote: >> >>> >>> >>> On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: >>> >>>> Thank You very much for your prompt reply >>>> >>>> I used the below dependencies only. Please kindly let me know still I >>>> have version issue with regards to my issue. >>>> >>>> <dependencies> >>>> <dependency> >>>> <groupId>net.sourceforge.owlapi</groupId> >>>> <artifactId>owlapi-distribution</artifactId> >>>> <version>5.1.17</version> >>>> </dependency> >>>> <dependency> >>>> <groupId>net.sourceforge.owlapi</groupId> >>>> <artifactId>org.semanticweb.hermit</artifactId> >>>> <version>1.4.3.517</version> >>>> </dependency> >>>> <dependency> >>>> <groupId>net.sourceforge.owlapi</groupId> >>>> <artifactId>owlexplanation</artifactId> >>>> <version>2.0.0</version> >>>> <type>jar</type> >>>> </dependency> >>>> >>>> >>> >>> These look correct. >>> Can you add this as first line to your Java code and post back the >>> result? >>> >>> System.out.println(System.getProperty("java.class.path")); >>> >>> Cheers, >>> Ignazio >>> >>> >>>> ------------------ >>>> >>>> Cheers! >>>> >>>> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >>>> ipa...@gm...> wrote: >>>> >>>>> >>>>> >>>>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>>>> >>>>>> HI >>>>>> >>>>>> Could Anyone please kindly assists me to resolve this issue. >>>>>> >>>>>> I have written a code to test an inconsistency Explanation. The code >>>>>> does not show any syntax error, but it got exceptions while running the >>>>>> code as follows; For your information, the code and the OWL explanation >>>>>> dependency are attached at the end. >>>>>> ------------------------------------------- >>>>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>>>> >>>>> -------------------------------------------- >>>>>> >>>>>> Used HermiT reasoner >>>>>> >>>>> >>>>> >>>>> Hi, >>>>> Which version of HermiT? >>>>> >>>>> The stack trace is typical of situations where two versions of OWLAPI >>>>> are on the classpath, and old versions of HermiT (1.3.8, for example) >>>>> include the OWLAPI classes in the HermiT jar, making it very hard to use >>>>> with newer libraries. At compile time this goes unnoticed because classpath >>>>> order differs. >>>>> >>>>> Cheers, >>>>> Ignazio >>>>> >>>>> >>>>>> Dependency used >>>>>> --------------------- >>>>>> <dependency> >>>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>>> <artifactId>owlexplanation</artifactId> >>>>>> <version>2.0.0</version> >>>>>> <type>jar</type> >>>>>> </dependency> >>>>>> ------------------------------- >>>>>> >>>>>> *code Snippet* >>>>>> >>>>>> public static void main(String[] args) throws IOException, >>>>>> OWLOntologyCreationException { >>>>>> OWLOntologyManager man = >>>>>> OWLManager.createOWLOntologyManager(); >>>>>> IRI IOR = IRI.create(" >>>>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>>>> >>>>>> OWLOntology o; >>>>>> >>>>>> >>>>>> o = man.createOntology(IOR); >>>>>> OWLDataFactory df = >>>>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>>>> >>>>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + >>>>>> "#R"); >>>>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + >>>>>> "#S"); >>>>>> OWLSubClassOfAxiom ax = >>>>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>>>> o.add(ax); >>>>>> >>>>>> // create an inconsistent ontology by declaring an >>>>>> individual member of two disjoint classes >>>>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>>>> "#testInv"); >>>>>> OWLDisjointClassesAxiom ax2 = >>>>>> df.getOWLDisjointClassesAxiom(A, B); >>>>>> o.add(ax2 ); >>>>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>>>> >>>>>> OWLReasonerFactory hermitreasonerFactory = new >>>>>> ReasonerFactory(); >>>>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>>>> >>>>>> System.out.println("check consistency"+ >>>>>> r.isConsistent()); >>>>>> >>>>>> //create the explanation generator --- this code is not >>>>>> working.............. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>>>> explanations = >>>>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>>>> .getOWLThing(), df.getOWLNothing())); >>>>>> System.out.println("TestExplanation.main() " + explanations);* >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> Cheers! >>>>>> >>>>>> -- >>>>>> Shyama Wilson >>>>>> Department of Computer Science and Informatics >>>>>> Uva Wellassa University: www.uwu.ac.lk >>>>>> Badulla, Sri Lanka >>>>>> email: sh...@uw... <am...@uw...> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Owlapi-developer mailing list >>>>>> Owl...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>>> >>>>> _______________________________________________ >>>>> Owlapi-developer mailing list >>>>> Owl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>> >>>> >>>> >>>> -- >>>> Department of Computer Science and Informatics >>>> Faculty of Applied Sciences >>>> Uva Wellassa University >>>> Badulla >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> >> >> -- >> Shyama Wilson >> Department of Computer Science and Informatics >> Uva Wellassa University: www.uwu.ac.lk >> Badulla, Sri Lanka >> email: sh...@uw... <am...@uw...> >> >> >> >> >> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > -- Shyama Wilson Department of Computer Science and Informatics Uva Wellassa University: www.uwu.ac.lk Badulla, Sri Lanka email: sh...@uw... <am...@uw...> |
From: Ignazio P. <ipa...@gm...> - 2021-08-04 04:11:10
|
On Wed, 4 Aug 2021, 05:56 Shyama, <shy...@gm...> wrote: > Hi > > Please find the result of that code.......... > Thanks, that revealed the guilty jar: C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi- osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar I'm guessing this might be coming in via version 2.0.0 of the explanation library. Try version 5.0.0 instead. Maven should have spotted the conflict and resolved to the latest version, but there's a possibility that would not have worked either. Version 5 should solve the issue cleanly. Cheers, I. ---------------------------------------------------- > OWL API Versions....................... > C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: > Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: > See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > > manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar > My Code Results....................... > Ontology(OntologyID(OntologyIRI(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) > VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: > {Declaration(ObjectProperty(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) > ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> > <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) > SubClassOf(ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) > ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } > > check consistency: false > > Exception in thread "main" java.lang.NoSuchMethodError: > org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; > at > org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) > at > org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) > at > org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) > at > com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) > Command execution failed. > org.apache.commons.exec.ExecuteException: Process exited with an error: 1 > (Exit value: 1) > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > at org.apache.commons.exec.DefaultExecutor.execute > (DefaultExecutor.java:166) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:982) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:929) > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:498) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > --------------------------------------------------- > > > My Test Example code----------------------------------------- > > public class OWLExplainationTest { > public static void main(String[] args) throws IOException, > OWLOntologyCreationException { > > System.out.println("OWL API Versions......................."); > > System.out.println(System.getProperty("java.class.path")); > > System.out.println("My Code Results......................."); > OWLOntologyManager man = OWLManager.createOWLOntologyManager(); > > IRI IOR = IRI.create(" > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); > > OWLOntology o; > > o = man.createOntology(IOR); > OWLDataFactory df = > o.getOWLOntologyManager().getOWLDataFactory(); > > > OWLClass A = df.getOWLClass(IOR + "#A"); > OWLClass B = df.getOWLClass(IOR + "#B"); > OWLClass X = df.getOWLClass(IOR + "#X"); > OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); > OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); > OWLSubClassOfAxiom ax = > df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), > df.getOWLObjectSomeValuesFrom(S, B)); > o.add(ax); > > OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + > "#hasValue"); > OWLDeclarationAxiom d_hasValue = > df.getOWLDeclarationAxiom(hasValue); > o.add(d_hasValue); > > // create an inconsistent ontology by declaring an individual > member of two disjoint classes > OWLIndividual i = df.getOWLNamedIndividual(IOR + > "#testInv"); > OWLDisjointClassesAxiom ax2 = > df.getOWLDisjointClassesAxiom(A, B); > o.add(ax2 ); > o.add(df.getOWLClassAssertionAxiom(A, i)); > o.add( df.getOWLClassAssertionAxiom(B, i)); > > System.out.println(o); > > OWLReasonerFactory hermitreasonerFactory = new > Reasoner.ReasonerFactory(); > OWLReasoner r = hermitreasonerFactory.createReasoner(o); > > System.out.println("check consistency: "+ r.isConsistent()); > > //create the explanation generator --- this code is not > working.............. > ExplanationGenerator<OWLAxiom> explainInconsistency = new > InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); > //Ask for an explanation of `Thing subclass of Nothing` - this axiom > is entailed in any inconsistent ontology > Set<Explanation<OWLAxiom>> explanations = > explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df > .getOWLThing(), df.getOWLNothing())); > System.out.println("TestExplanation.main() " + explanations); > > } > > > -------------------------------------- > > On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < > ipa...@gm...> wrote: > >> >> >> On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: >> >>> Thank You very much for your prompt reply >>> >>> I used the below dependencies only. Please kindly let me know still I >>> have version issue with regards to my issue. >>> >>> <dependencies> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>owlapi-distribution</artifactId> >>> <version>5.1.17</version> >>> </dependency> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>org.semanticweb.hermit</artifactId> >>> <version>1.4.3.517</version> >>> </dependency> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>owlexplanation</artifactId> >>> <version>2.0.0</version> >>> <type>jar</type> >>> </dependency> >>> >>> >> >> These look correct. >> Can you add this as first line to your Java code and post back the result? >> >> System.out.println(System.getProperty("java.class.path")); >> >> Cheers, >> Ignazio >> >> >>> ------------------ >>> >>> Cheers! >>> >>> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >>> ipa...@gm...> wrote: >>> >>>> >>>> >>>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>>> >>>>> HI >>>>> >>>>> Could Anyone please kindly assists me to resolve this issue. >>>>> >>>>> I have written a code to test an inconsistency Explanation. The code >>>>> does not show any syntax error, but it got exceptions while running the >>>>> code as follows; For your information, the code and the OWL explanation >>>>> dependency are attached at the end. >>>>> ------------------------------------------- >>>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>>> >>>> -------------------------------------------- >>>>> >>>>> Used HermiT reasoner >>>>> >>>> >>>> >>>> Hi, >>>> Which version of HermiT? >>>> >>>> The stack trace is typical of situations where two versions of OWLAPI >>>> are on the classpath, and old versions of HermiT (1.3.8, for example) >>>> include the OWLAPI classes in the HermiT jar, making it very hard to use >>>> with newer libraries. At compile time this goes unnoticed because classpath >>>> order differs. >>>> >>>> Cheers, >>>> Ignazio >>>> >>>> >>>>> Dependency used >>>>> --------------------- >>>>> <dependency> >>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>> <artifactId>owlexplanation</artifactId> >>>>> <version>2.0.0</version> >>>>> <type>jar</type> >>>>> </dependency> >>>>> ------------------------------- >>>>> >>>>> *code Snippet* >>>>> >>>>> public static void main(String[] args) throws IOException, >>>>> OWLOntologyCreationException { >>>>> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >>>>> IRI IOR = IRI.create(" >>>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>>> >>>>> OWLOntology o; >>>>> >>>>> >>>>> o = man.createOntology(IOR); >>>>> OWLDataFactory df = >>>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>>> >>>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + >>>>> "#R"); >>>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + >>>>> "#S"); >>>>> OWLSubClassOfAxiom ax = >>>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>>> o.add(ax); >>>>> >>>>> // create an inconsistent ontology by declaring an >>>>> individual member of two disjoint classes >>>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>>> "#testInv"); >>>>> OWLDisjointClassesAxiom ax2 = >>>>> df.getOWLDisjointClassesAxiom(A, B); >>>>> o.add(ax2 ); >>>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>>> >>>>> OWLReasonerFactory hermitreasonerFactory = new >>>>> ReasonerFactory(); >>>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>>> >>>>> System.out.println("check consistency"+ r.isConsistent()); >>>>> >>>>> //create the explanation generator --- this code is not >>>>> working.............. >>>>> >>>>> >>>>> >>>>> >>>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>>> explanations = >>>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>>> .getOWLThing(), df.getOWLNothing())); >>>>> System.out.println("TestExplanation.main() " + explanations);* >>>>> >>>>> } >>>>> >>>>> >>>>> Cheers! >>>>> >>>>> -- >>>>> Shyama Wilson >>>>> Department of Computer Science and Informatics >>>>> Uva Wellassa University: www.uwu.ac.lk >>>>> Badulla, Sri Lanka >>>>> email: sh...@uw... <am...@uw...> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Owlapi-developer mailing list >>>>> Owl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>> >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> >>> >>> -- >>> Department of Computer Science and Informatics >>> Faculty of Applied Sciences >>> Uva Wellassa University >>> Badulla >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > > > -- > Shyama Wilson > Department of Computer Science and Informatics > Uva Wellassa University: www.uwu.ac.lk > Badulla, Sri Lanka > email: sh...@uw... <am...@uw...> > > > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |
From: Lewis J. M. <lew...@gm...> - 2021-08-04 03:53:33
|
Hi Shyama, You can utilize the Maven dependency analyze report target. The generated report will allow you to further debug the issues. Most likely you may need to <exclude> one or more transitive dependencies to resolve the runtime classpath issues. Hth lewismc On Tue, Aug 3, 2021 at 19:56 Shyama <shy...@gm...> wrote: > Hi > > Please find the result of that code.......... > ---------------------------------------------------- > OWL API Versions....................... > C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: > Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: > See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > > manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar > My Code Results....................... > Ontology(OntologyID(OntologyIRI(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) > VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: > {Declaration(ObjectProperty(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) > ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) > DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> > <http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) > SubClassOf(ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) > ObjectSomeValuesFrom(< > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } > > check consistency: false > > Exception in thread "main" java.lang.NoSuchMethodError: > org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; > at > org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) > at > org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) > at > org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) > at > org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) > at > com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) > Command execution failed. > org.apache.commons.exec.ExecuteException: Process exited with an error: 1 > (Exit value: 1) > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > at org.apache.commons.exec.DefaultExecutor.execute > (DefaultExecutor.java:166) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:982) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine > (ExecMojo.java:929) > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:498) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > --------------------------------------------------- > > > My Test Example code----------------------------------------- > > public class OWLExplainationTest { > public static void main(String[] args) throws IOException, > OWLOntologyCreationException { > > System.out.println("OWL API Versions......................."); > > System.out.println(System.getProperty("java.class.path")); > > System.out.println("My Code Results......................."); > OWLOntologyManager man = OWLManager.createOWLOntologyManager(); > > IRI IOR = IRI.create(" > http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); > > OWLOntology o; > > o = man.createOntology(IOR); > OWLDataFactory df = > o.getOWLOntologyManager().getOWLDataFactory(); > > > OWLClass A = df.getOWLClass(IOR + "#A"); > OWLClass B = df.getOWLClass(IOR + "#B"); > OWLClass X = df.getOWLClass(IOR + "#X"); > OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); > OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); > OWLSubClassOfAxiom ax = > df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), > df.getOWLObjectSomeValuesFrom(S, B)); > o.add(ax); > > OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + > "#hasValue"); > OWLDeclarationAxiom d_hasValue = > df.getOWLDeclarationAxiom(hasValue); > o.add(d_hasValue); > > // create an inconsistent ontology by declaring an individual > member of two disjoint classes > OWLIndividual i = df.getOWLNamedIndividual(IOR + > "#testInv"); > OWLDisjointClassesAxiom ax2 = > df.getOWLDisjointClassesAxiom(A, B); > o.add(ax2 ); > o.add(df.getOWLClassAssertionAxiom(A, i)); > o.add( df.getOWLClassAssertionAxiom(B, i)); > > System.out.println(o); > > OWLReasonerFactory hermitreasonerFactory = new > Reasoner.ReasonerFactory(); > OWLReasoner r = hermitreasonerFactory.createReasoner(o); > > System.out.println("check consistency: "+ r.isConsistent()); > > //create the explanation generator --- this code is not > working.............. > ExplanationGenerator<OWLAxiom> explainInconsistency = new > InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); > //Ask for an explanation of `Thing subclass of Nothing` - this axiom > is entailed in any inconsistent ontology > Set<Explanation<OWLAxiom>> explanations = > explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df > .getOWLThing(), df.getOWLNothing())); > System.out.println("TestExplanation.main() " + explanations); > > } > > > -------------------------------------- > > On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < > ipa...@gm...> wrote: > >> >> >> On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: >> >>> Thank You very much for your prompt reply >>> >>> I used the below dependencies only. Please kindly let me know still I >>> have version issue with regards to my issue. >>> >>> <dependencies> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>owlapi-distribution</artifactId> >>> <version>5.1.17</version> >>> </dependency> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>org.semanticweb.hermit</artifactId> >>> <version>1.4.3.517</version> >>> </dependency> >>> <dependency> >>> <groupId>net.sourceforge.owlapi</groupId> >>> <artifactId>owlexplanation</artifactId> >>> <version>2.0.0</version> >>> <type>jar</type> >>> </dependency> >>> >>> >> >> These look correct. >> Can you add this as first line to your Java code and post back the result? >> >> System.out.println(System.getProperty("java.class.path")); >> >> Cheers, >> Ignazio >> >> >>> ------------------ >>> >>> Cheers! >>> >>> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >>> ipa...@gm...> wrote: >>> >>>> >>>> >>>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>>> >>>>> HI >>>>> >>>>> Could Anyone please kindly assists me to resolve this issue. >>>>> >>>>> I have written a code to test an inconsistency Explanation. The code >>>>> does not show any syntax error, but it got exceptions while running the >>>>> code as follows; For your information, the code and the OWL explanation >>>>> dependency are attached at the end. >>>>> ------------------------------------------- >>>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>>> >>>> -------------------------------------------- >>>>> >>>>> Used HermiT reasoner >>>>> >>>> >>>> >>>> Hi, >>>> Which version of HermiT? >>>> >>>> The stack trace is typical of situations where two versions of OWLAPI >>>> are on the classpath, and old versions of HermiT (1.3.8, for example) >>>> include the OWLAPI classes in the HermiT jar, making it very hard to use >>>> with newer libraries. At compile time this goes unnoticed because classpath >>>> order differs. >>>> >>>> Cheers, >>>> Ignazio >>>> >>>> >>>>> Dependency used >>>>> --------------------- >>>>> <dependency> >>>>> <groupId>net.sourceforge.owlapi</groupId> >>>>> <artifactId>owlexplanation</artifactId> >>>>> <version>2.0.0</version> >>>>> <type>jar</type> >>>>> </dependency> >>>>> ------------------------------- >>>>> >>>>> *code Snippet* >>>>> >>>>> public static void main(String[] args) throws IOException, >>>>> OWLOntologyCreationException { >>>>> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >>>>> IRI IOR = IRI.create(" >>>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>>> >>>>> OWLOntology o; >>>>> >>>>> >>>>> o = man.createOntology(IOR); >>>>> OWLDataFactory df = >>>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>>> >>>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + >>>>> "#R"); >>>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + >>>>> "#S"); >>>>> OWLSubClassOfAxiom ax = >>>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>>> o.add(ax); >>>>> >>>>> // create an inconsistent ontology by declaring an >>>>> individual member of two disjoint classes >>>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>>> "#testInv"); >>>>> OWLDisjointClassesAxiom ax2 = >>>>> df.getOWLDisjointClassesAxiom(A, B); >>>>> o.add(ax2 ); >>>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>>> >>>>> OWLReasonerFactory hermitreasonerFactory = new >>>>> ReasonerFactory(); >>>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>>> >>>>> System.out.println("check consistency"+ r.isConsistent()); >>>>> >>>>> //create the explanation generator --- this code is not >>>>> working.............. >>>>> >>>>> >>>>> >>>>> >>>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>>> explanations = >>>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>>> .getOWLThing(), df.getOWLNothing())); >>>>> System.out.println("TestExplanation.main() " + explanations);* >>>>> >>>>> } >>>>> >>>>> >>>>> Cheers! >>>>> >>>>> -- >>>>> Shyama Wilson >>>>> Department of Computer Science and Informatics >>>>> Uva Wellassa University: www.uwu.ac.lk >>>>> Badulla, Sri Lanka >>>>> email: sh...@uw... <am...@uw...> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Owlapi-developer mailing list >>>>> Owl...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>>> >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> >>> >>> -- >>> Department of Computer Science and Informatics >>> Faculty of Applied Sciences >>> Uva Wellassa University >>> Badulla >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > > > -- > Shyama Wilson > Department of Computer Science and Informatics > Uva Wellassa University: www.uwu.ac.lk > Badulla, Sri Lanka > email: sh...@uw... <am...@uw...> > > > > > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > -- *Lewis* Dr. Lewis J. McGibbney Ph.D, B.Sc *Skype*: lewis.john.mcgibbney |
From: Shyama <shy...@gm...> - 2021-08-04 02:56:14
|
Hi Please find the result of that code.......... ---------------------------------------------------- OWL API Versions....................... C:\Users\HP\Documents\NetBeansProjects\TestOWLExplanation\target\classes;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-distribution\5.1.17\owlapi-distribution-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-compatibility\5.1.17\owlapi-compatibility-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-apibinding\5.1.17\owlapi-apibinding-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-api\5.1.17\owlapi-api-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-impl\5.1.17\owlapi-impl-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-parsers\5.1.17\owlapi-parsers-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-oboformat\5.1.17\owlapi-oboformat-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-tools\5.1.17\owlapi-tools-5.1.17.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-rio\5.1.17\owlapi-rio-5.1.17.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.10\jackson-core-2.9.10.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.10.5\jackson-databind-2.9.10.5.jar;C:\Users\HP\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.10\jackson-annotations-2.9.10.jar;C:\Users\HP\.m2\repository\org\apache\commons\commons-rdf-api\0.5.0\commons-rdf-api-0.5.0.jar;C:\Users\HP\.m2\repository\org\tukaani\xz\1.6\xz-1.6.jar;C:\Users\HP\.m2\repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;C:\Users\HP\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-model\3.4.3\rdf4j-model-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-api\3.4.3\rdf4j-rio-api-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-languages\3.4.3\rdf4j-rio-languages-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-datatypes\3.4.3\rdf4j-rio-datatypes-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-binary\3.4.3\rdf4j-rio-binary-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-n3\3.4.3\rdf4j-rio-n3-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-nquads\3.4.3\rdf4j-rio-nquads-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-ntriples\3.4.3\rdf4j-rio-ntriples-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfjson\3.4.3\rdf4j-rio-rdfjson-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-jsonld\3.4.3\rdf4j-rio-jsonld-3.4.3.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient\4.5.10\httpclient-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-cache\4.5.10\httpclient-cache-4.5.10.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-rdfxml\3.4.3\rdf4j-rio-rdfxml-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trix\3.4.3\rdf4j-rio-trix-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-turtle\3.4.3\rdf4j-rio-turtle-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-trig\3.4.3\rdf4j-rio-trig-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-rio-hdt\3.4.3\rdf4j-rio-hdt-3.4.3.jar;C:\Users\HP\.m2\repository\org\eclipse\rdf4j\rdf4j-util\3.4.3\rdf4j-util-3.4.3.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java\0.13.0\jsonld-java-0.13.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpclient-osgi\4.5.10\httpclient-osgi-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpmime\4.5.10\httpmime-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\fluent-hc\4.5.10\fluent-hc-4.5.10.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-osgi\4.4.12\httpcore-osgi-4.4.12.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.12\httpcore-nio-4.SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation 4.12.jar;C:\Users\HP\.m2\repository\com\github\vsonnier\hppcrt\0.7.5\hppcrt-0.7.5.jar;C:\Users\HP\.m2\repository\com\github\ben-SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. manes\caffeine\caffeine\2.8.1\caffeine-2.8.1.jar;C:\Users\HP\.m2\repository\org\checkerframework\checker-qual\3.1.0\checker-qual-3.1.0.jar;C:\Users\HP\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\HP\.m2\repository\com\google\guava\guava\30.0-jre\guava-30.0-jre.jar;C:\Users\HP\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\HP\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\HP\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\HP\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\HP\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\org.semanticweb.hermit\1.4.3.517\org.semanticweb.hermit-1.4.3.517.jar;C:\Users\HP\.m2\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.14\axiom-api-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.1\geronimo-activation_1.1_spec-1.1.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\HP\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\HP\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;C:\Users\HP\.m2\repository\org\apache\james\apache-mime4j-core\0.7.2\apache-mime4j-core-0.7.2.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-c14n\1.2.14\axiom-c14n-1.2.14.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.14\axiom-impl-1.2.14.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.1.4\woodstox-core-asl-4.1.4.jar;C:\Users\HP\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\HP\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.14\axiom-dom-1.2.14.jar;C:\Users\HP\.m2\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;C:\Users\HP\.m2\repository\gnu\getopt\java-getopt\1.0.13\java-getopt-1.0.13.jar;C:\Users\HP\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlexplanation\2.0.0\owlexplanation-2.0.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\owlapi-osgidistribution\4.1.3\owlapi-osgidistribution-4.1.3.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-model\2.7.12\sesame-model-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-api\2.7.12\sesame-rio-api-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-languages\2.7.12\sesame-rio-languages-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-datatypes\2.7.12\sesame-rio-datatypes-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-binary\2.7.12\sesame-rio-binary-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-n3\2.7.12\sesame-rio-n3-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-nquads\2.7.12\sesame-rio-nquads-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-ntriples\2.7.12\sesame-rio-ntriples-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfjson\2.7.12\sesame-rio-rdfjson-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-rdfxml\2.7.12\sesame-rio-rdfxml-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trix\2.7.12\sesame-rio-trix-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-turtle\2.7.12\sesame-rio-turtle-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-rio-trig\2.7.12\sesame-rio-trig-2.7.12.jar;C:\Users\HP\.m2\repository\org\openrdf\sesame\sesame-util\2.7.12\sesame-util-2.7.12.jar;C:\Users\HP\.m2\repository\com\github\jsonld-java\jsonld-java-sesame\0.5.0\jsonld-java-sesame-0.5.0.jar;C:\Users\HP\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\HP\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-sesame\0.6.1\semargl-sesame-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-core\0.6.1\semargl-core-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdfa\0.6.1\semargl-rdfa-0.6.1.jar;C:\Users\HP\.m2\repository\org\semarglproject\semargl-rdf\0.6.1\semargl-rdf-0.6.1.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.javax-inject\1_2\org.apache.servicemix.bundles.javax-inject-1_2.jar;C:\Users\HP\.m2\repository\org\apache\servicemix\bundles\org.apache.servicemix.bundles.aopalliance\1.0_6\org.apache.servicemix.bundles.aopalliance-1.0_6.jar;C:\Users\HP\.m2\repository\com\google\inject\guice\4.0\guice-4.0.jar;C:\Users\HP\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\HP\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-assistedinject\4.0\guice-assistedinject-4.0.jar;C:\Users\HP\.m2\repository\com\google\inject\extensions\guice-multibindings\4.0\guice-multibindings-4.0.jar;C:\Users\HP\.m2\repository\net\sourceforge\owlapi\telemetry\2.0.0\telemetry-2.0.0.jar My Code Results....................... Ontology(OntologyID(OntologyIRI(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1>) VersionIRI(<null>))) [Axioms: 5 Logical Axioms: 4] First 20 axioms: {Declaration(ObjectProperty(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#hasValue>)) ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) ClassAssertion(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#testInv>) DisjointClasses(<http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>) SubClassOf(ObjectSomeValuesFrom(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#R> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#A>) ObjectSomeValuesFrom(< http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#S> < http://www.sln4mop.org/ontologies/2021/GoviOntologyV1#B>)) } check consistency: false Exception in thread "main" java.lang.NoSuchMethodError: org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; at org.semanticweb.owl.explanation.impl.blackbox.checker.ConsistencyEntailmentChecker.isEntailed(ConsistencyEntailmentChecker.java:110) at org.semanticweb.owl.explanation.impl.blackbox.InconsistentOntologyExpansionStrategy.doExpansion(InconsistentOntologyExpansionStrategy.java:44) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.doExpansion(BlackBoxExplanationGenerator2.java:258) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.computeExplanation(BlackBoxExplanationGenerator2.java:179) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.generateExplanation(BlackBoxExplanationGenerator2.java:289) at org.semanticweb.owl.explanation.impl.blackbox.hst.HittingSetTree.buildHittingSetTree(HittingSetTree.java:116) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:114) at org.semanticweb.owl.explanation.impl.blackbox.BlackBoxExplanationGenerator2.getExplanations(BlackBoxExplanationGenerator2.java:91) at com.mycompany.testowlexplanation.OWLExplainationTest.main(OWLExplainationTest.java:81) Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929) at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) --------------------------------------------------- My Test Example code----------------------------------------- public class OWLExplainationTest { public static void main(String[] args) throws IOException, OWLOntologyCreationException { System.out.println("OWL API Versions......................."); System.out.println(System.getProperty("java.class.path")); System.out.println("My Code Results......................."); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); IRI IOR = IRI.create(" http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); OWLOntology o; o = man.createOntology(IOR); OWLDataFactory df = o.getOWLOntologyManager().getOWLDataFactory(); OWLClass A = df.getOWLClass(IOR + "#A"); OWLClass B = df.getOWLClass(IOR + "#B"); OWLClass X = df.getOWLClass(IOR + "#X"); OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); OWLSubClassOfAxiom ax = df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), df.getOWLObjectSomeValuesFrom(S, B)); o.add(ax); OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + "#hasValue"); OWLDeclarationAxiom d_hasValue = df.getOWLDeclarationAxiom(hasValue); o.add(d_hasValue); // create an inconsistent ontology by declaring an individual member of two disjoint classes OWLIndividual i = df.getOWLNamedIndividual(IOR + "#testInv"); OWLDisjointClassesAxiom ax2 = df.getOWLDisjointClassesAxiom(A, B); o.add(ax2 ); o.add(df.getOWLClassAssertionAxiom(A, i)); o.add( df.getOWLClassAssertionAxiom(B, i)); System.out.println(o); OWLReasonerFactory hermitreasonerFactory = new Reasoner.ReasonerFactory(); OWLReasoner r = hermitreasonerFactory.createReasoner(o); System.out.println("check consistency: "+ r.isConsistent()); //create the explanation generator --- this code is not working.............. ExplanationGenerator<OWLAxiom> explainInconsistency = new InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); //Ask for an explanation of `Thing subclass of Nothing` - this axiom is entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> explanations = explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df .getOWLThing(), df.getOWLNothing())); System.out.println("TestExplanation.main() " + explanations); } -------------------------------------- On Wed, Aug 4, 2021 at 1:13 AM Ignazio Palmisano < ipa...@gm...> wrote: > > > On Tue, 3 Aug 2021, 22:23 Shyama Wilson, <sh...@uw...> wrote: > >> Thank You very much for your prompt reply >> >> I used the below dependencies only. Please kindly let me know still I >> have version issue with regards to my issue. >> >> <dependencies> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>owlapi-distribution</artifactId> >> <version>5.1.17</version> >> </dependency> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>org.semanticweb.hermit</artifactId> >> <version>1.4.3.517</version> >> </dependency> >> <dependency> >> <groupId>net.sourceforge.owlapi</groupId> >> <artifactId>owlexplanation</artifactId> >> <version>2.0.0</version> >> <type>jar</type> >> </dependency> >> >> > > These look correct. > Can you add this as first line to your Java code and post back the result? > > System.out.println(System.getProperty("java.class.path")); > > Cheers, > Ignazio > > >> ------------------ >> >> Cheers! >> >> On Wed, Aug 4, 2021 at 12:08 AM Ignazio Palmisano < >> ipa...@gm...> wrote: >> >>> >>> >>> On Tue, 3 Aug 2021, 21:30 Shyama, <shy...@gm...> wrote: >>> >>>> HI >>>> >>>> Could Anyone please kindly assists me to resolve this issue. >>>> >>>> I have written a code to test an inconsistency Explanation. The code >>>> does not show any syntax error, but it got exceptions while running the >>>> code as follows; For your information, the code and the OWL explanation >>>> dependency are attached at the end. >>>> ------------------------------------------- >>>> Exception in thread "main" java.lang.NoSuchMethodError: >>>> org.semanticweb.owlapi.model.OWLOntologyManager.createOntology(Ljava/util/Set;)Lorg/semanticweb/owlapi/model/OWLOntology; >>>> >>> -------------------------------------------- >>>> >>>> Used HermiT reasoner >>>> >>> >>> >>> Hi, >>> Which version of HermiT? >>> >>> The stack trace is typical of situations where two versions of OWLAPI >>> are on the classpath, and old versions of HermiT (1.3.8, for example) >>> include the OWLAPI classes in the HermiT jar, making it very hard to use >>> with newer libraries. At compile time this goes unnoticed because classpath >>> order differs. >>> >>> Cheers, >>> Ignazio >>> >>> >>>> Dependency used >>>> --------------------- >>>> <dependency> >>>> <groupId>net.sourceforge.owlapi</groupId> >>>> <artifactId>owlexplanation</artifactId> >>>> <version>2.0.0</version> >>>> <type>jar</type> >>>> </dependency> >>>> ------------------------------- >>>> >>>> *code Snippet* >>>> >>>> public static void main(String[] args) throws IOException, >>>> OWLOntologyCreationException { >>>> OWLOntologyManager man = OWLManager.createOWLOntologyManager(); >>>> IRI IOR = IRI.create(" >>>> http://www.sln4mop.org/ontologies/2021/GoviOntologyV1"); >>>> >>>> OWLOntology o; >>>> >>>> >>>> o = man.createOntology(IOR); >>>> OWLDataFactory df = >>>> o.getOWLOntologyManager().getOWLDataFactory(); >>>> >>>> OWLClass A = df.getOWLClass(IOR + "#A"); >>>> OWLClass B = df.getOWLClass(IOR + "#B"); >>>> OWLClass X = df.getOWLClass(IOR + "#X"); >>>> OWLObjectProperty R = df.getOWLObjectProperty(IOR + "#R"); >>>> OWLObjectProperty S = df.getOWLObjectProperty(IOR + "#S"); >>>> OWLSubClassOfAxiom ax = >>>> df.getOWLSubClassOfAxiom(df.getOWLObjectSomeValuesFrom(R, A), >>>> df.getOWLObjectSomeValuesFrom(S, B)); >>>> o.add(ax); >>>> >>>> // create an inconsistent ontology by declaring an >>>> individual member of two disjoint classes >>>> OWLIndividual i = df.getOWLNamedIndividual(IOR + >>>> "#testInv"); >>>> OWLDisjointClassesAxiom ax2 = >>>> df.getOWLDisjointClassesAxiom(A, B); >>>> o.add(ax2 ); >>>> o.add(df.getOWLClassAssertionAxiom(A, i)); >>>> o.add( df.getOWLClassAssertionAxiom(B, i)) >>>> >>>> OWLReasonerFactory hermitreasonerFactory = new >>>> ReasonerFactory(); >>>> OWLReasoner r = hermitreasonerFactory.createReasoner(o); >>>> >>>> System.out.println("check consistency"+ r.isConsistent()); >>>> >>>> //create the explanation generator --- this code is not >>>> working.............. >>>> >>>> >>>> >>>> >>>> * ExplanationGenerator<OWLAxiom> explainInconsistency = new >>>> InconsistentOntologyExplanationGeneratorFactory(hermitreasonerFactory,1000L).createExplanationGenerator(o); >>>> // Ask for an explanation of `Thing subclass of Nothing` - this axiom is >>>> entailed in any inconsistent ontology Set<Explanation<OWLAxiom>> >>>> explanations = >>>> explainInconsistency.getExplanations(df.getOWLSubClassOfAxiom(df >>>> .getOWLThing(), df.getOWLNothing())); >>>> System.out.println("TestExplanation.main() " + explanations);* >>>> >>>> } >>>> >>>> >>>> Cheers! >>>> >>>> -- >>>> Shyama Wilson >>>> Department of Computer Science and Informatics >>>> Uva Wellassa University: www.uwu.ac.lk >>>> Badulla, Sri Lanka >>>> email: sh...@uw... <am...@uw...> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Owlapi-developer mailing list >>>> Owl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>>> >>> _______________________________________________ >>> Owlapi-developer mailing list >>> Owl...@li... >>> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >>> >> >> >> -- >> Department of Computer Science and Informatics >> Faculty of Applied Sciences >> Uva Wellassa University >> Badulla >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > -- Shyama Wilson Department of Computer Science and Informatics Uva Wellassa University: www.uwu.ac.lk Badulla, Sri Lanka email: sh...@uw... <am...@uw...> |