Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when Precomputing Inferences #97

Open
tobiaswjohn opened this issue Feb 13, 2025 · 0 comments
Open

NullPointerException when Precomputing Inferences #97

tobiaswjohn opened this issue Feb 13, 2025 · 0 comments

Comments

@tobiaswjohn
Copy link

I am using Openllet to compute the class hierarchy of an ontology. I discovered a case, where Openllet throws an exception.

  • The input ontology for which the exception occurs is too large to add it in the text here, but can be found in the following github repository
  • Here is the call from my program:
OWLOntologyDocumentSource source = new FileDocumentSource(ontFile, new FunctionalSyntaxDocumentFormat());
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OwlOntology ont = manager.loadOntologyFromOntologyDocument(source);

OpenlletReasonerFactory rf = new OpenlletReasonerFactory();
OWLReasoner openllet = rf.createReasoner(ont);

/// precomputation for class hierarchy
if (openllet.isConsistent()) {
 openllet.precomputeInferences(InferenceType.CLASS_HIERARCHY);
}
  • the following exception is thrown:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "openllet.core.boxes.abox.Individual.isMerged()" because "node1" is null
	at openllet.core.rules.RuleAtomAsserter.addEdge(RuleAtomAsserter.java:107)
	at openllet.core.rules.RuleAtomAsserter.visit(RuleAtomAsserter.java:163)
	at openllet.core.rules.model.IndividualPropertyAtom.accept(IndividualPropertyAtom.java:35)
	at openllet.core.rules.RuleAtomAsserter.assertAtom(RuleAtomAsserter.java:68)
	at openllet.core.tableau.branch.RuleBranch.tryBranch(RuleBranch.java:139)
	at openllet.core.tableau.branch.Branch.tryNext(Branch.java:130)
	at openllet.core.rules.ContinuousRulesStrategy.createDisjunctionsFromBinding(ContinuousRulesStrategy.java:363)
	at openllet.core.rules.ContinuousRulesStrategy.applyRuleBindings(ContinuousRulesStrategy.java:171)
	at openllet.core.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:262)
	at openllet.core.boxes.abox.ABoxImpl.lambda$isConsistent$12(ABoxImpl.java:1417)
	at openllet.core.utils.Timers.execute(Timers.java:118)
	at openllet.core.boxes.abox.ABoxImpl.isConsistent(ABoxImpl.java:1417)
	at openllet.core.boxes.abox.ABoxImpl.existType(ABoxImpl.java:905)
	at openllet.core.knowledge.InstancesBase.retrieve(InstancesBase.java:268)
	at openllet.core.KnowledgeBaseImplFullSync.retrieve(KnowledgeBaseImplFullSync.java:733)
	at openllet.core.taxonomy.CDOptimizedTaxonomyBuilder.realizeByConcept(CDOptimizedTaxonomyBuilder.java:1353)
	at openllet.core.taxonomy.CDOptimizedTaxonomyBuilder.realizeByConcept(CDOptimizedTaxonomyBuilder.java:1361)
	at openllet.core.taxonomy.CDOptimizedTaxonomyBuilder.realizeByConcepts(CDOptimizedTaxonomyBuilder.java:1322)
	at openllet.core.taxonomy.CDOptimizedTaxonomyBuilder.realize(CDOptimizedTaxonomyBuilder.java:1181)
	at openllet.core.KnowledgeBaseImpl.realize(KnowledgeBaseImpl.java:1950)
	at openllet.core.KnowledgeBaseImplFullSync.realize(KnowledgeBaseImplFullSync.java:391)
	at openllet.owlapi.PelletReasoner.precomputeInferences(PelletReasoner.java:1292)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant