You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current ELK (0.3.0) throws an NPE during the creation of the reasoner for
one of our ontologies.
This happens in Protege and using plain Java. I have attached a sample project
which demonstrates this. Just execute the main in the only class in this
project.
Alternatively load the following URL in Protege (tested with 4.1 and
4.2-beta-278):
http://purl.obolibrary.org/obo/go/extensions/x-chemical-importer.owl
The Protege error message is the following:
java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.semanticweb.elk.owlapi.OwlOntologyLoader$1.load(OwlOntologyLoader.java:125)
at org.semanticweb.elk.reasoner.stages.OntologyLoadingStage.execute(OntologyLoadingStage.java:71)
at org.semanticweb.elk.reasoner.stages.LoggingStageExecutor.complete(LoggingStageExecutor.java:56)
at org.semanticweb.elk.reasoner.stages.AbstractReasonerState.loadOntology(AbstractReasonerState.java:265)
at org.semanticweb.elk.owlapi.ElkReasoner.<init>(ElkReasoner.java:153)
at org.semanticweb.elk.owlapi.ElkReasoner.<init>(ElkReasoner.java:168)
at org.semanticweb.elk.owlapi.ElkReasonerFactory.createElkReasoner(ElkReasonerFactory.java:104)
at org.semanticweb.elk.owlapi.ElkReasonerFactory.createReasoner(ElkReasonerFactory.java:83)
at org.protege.editor.owl.model.inference.ReasonerUtilities.createReasoner(ReasonerUtilities.java:21)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.ensureRunningReasonerInitialized(OWLReasonerManagerImpl.java:401)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:354)
at java.lang.Thread.run(Thread.java:680)
Judging from the code in the implementation, there might be an 'else' missing
in org.semanticweb.elk.owlapi.OwlOntologyLoader. The ontology is an importer
and has no axioms itself, maybe this breaks some of the assumptions in the
loader.
We are looking very much forward to using the new ELK, but this is quite the
show stopper for us. This did not happen in ELK 0.2.0.
Thank you for considering.
Original issue reported on code.google.com by HDie...@lbl.gov on 3 Aug 2012 at 6:12
Many thanks for a detailed bug report!
The issue should now have been fixed in the trunk. The cause of the exception
was that in the OwlOntologyLoader the status of the newly created iterator
over the imported axioms has not been checked on emptiness (using hasNext()).
The fix is just 1 line of code. I was working for me with your ontology.
Until the next release, you can download use the latest nightly build of ELK :
http://code.google.com/p/elk-reasoner/wiki/GettingElk
Cheers,
Yevgeny
Original comment by ykazako...@gmail.com on 3 Aug 2012 at 11:18
Original issue reported on code.google.com by
HDie...@lbl.gov
on 3 Aug 2012 at 6:12Attachments:
The text was updated successfully, but these errors were encountered: