java.lang.NullPointerException
at org.mindswap.pellet.taxonomy.CDOptimizedTaxonomyBuilder.classify(CDOptimizedTaxonomyBuilder.java:826)
at org.mindswap.pellet.taxonomy.CDOptimizedTaxonomyBuilder.classify(CDOptimizedTaxonomyBuilder.java:802)
at org.mindswap.pellet.KnowledgeBase.getAllEquivalentClasses(KnowledgeBase.java:3565)
at org.mindswap.pellet.KnowledgeBase.getEquivalentClasses(KnowledgeBase.java:3535)
at com.clarkparsia.pellet.owlapiv3.PelletReasoner.getDataPropertyDomains(PelletReasoner.java:414)
The reason is in class CDOptimizedTaxonomyBuilder in line 826
ConceptFlag flag = conceptFlags.get( c );
The conceptFlags object is not created because the method classify() returns before because of an empty set of classes.
The current implementation of Pellet does not work when we load an ontology with no classes and then e.g. ask for domains of a property.
The ontology:
The example code:
Exception:
The reason is in class CDOptimizedTaxonomyBuilder in line 826
The
conceptFlags
object is not created because the methodclassify()
returns before because of an empty set of classes.