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 in BlockingContext.moveBlockerUp #36

Open
Locke opened this issue Jun 4, 2018 · 5 comments
Open

NullPointerException in BlockingContext.moveBlockerUp #36

Locke opened this issue Jun 4, 2018 · 5 comments
Labels
bug Developper confirm there is a bug in the product.

Comments

@Locke
Copy link
Contributor

Locke commented Jun 4, 2018

Hi,

I'm using openllet-owlapi version 2.6.4 and owlapi-api version 5.1.5.

I get this NullPointerException when I try to work with a specific ontology:

Exception in thread "main" java.lang.NullPointerException
	at openllet.core.tableau.blocking.BlockingContext.moveBlockerUp(BlockingContext.java:45)
	at openllet.core.tableau.blocking.Blocking.isDirectlyBlockedByDescendant(Blocking.java:156)
	at openllet.core.tableau.blocking.Blocking.isDirectlyBlockedInt(Blocking.java:129)
	at openllet.core.tableau.blocking.Blocking.isBlocked(Blocking.java:80)
	at openllet.core.tableau.completion.rule.AbstractTableauRule.apply(AbstractTableauRule.java:104)
	at openllet.core.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:251)
	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.realizeByConcept(CDOptimizedTaxonomyBuilder.java:1361)
	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:1285)

As the ontology is not public yet I'd like to send it to you via mail (or some other channel. It's nothing secret, but I'm not comfortable sharing it openly without consent from all involved parties).

Initially I got the exception when I called reasoner.types(someIndividual), and I have now created a smaller version to investigate this error better: https://gist.github.com/Locke/c275b45823f014ba4a09400fe462c39d

The basic idea is that there is a basic ontology (created with Protégé) which is then imported by a second file that contains the individuals (created programmatically via owlapi from some other data source).

As I'm quite new to owl it might be that I made a terrible mistake, but in that case it should be detected and guided with a better exception.

@Galigator
Copy link
Owner

If you do not want to share a complete ontology you can try this program :
https://github.com/Galigator/openllet/blob/integration/tools-pellint/searchMinimalBug.sh
Given a big ontology that make the reasoner fail, It try to compute a minimal ontology that make the reasoner also fail (And it does a lot of renaming). It never terminate, so you have to Ctrl+C when a smaller ontology is found.

@Locke
Copy link
Contributor Author

Locke commented Jun 4, 2018

Thanks, that nailed it down a lot!

I've uploaded the result here: https://gist.github.com/Locke/c275b45823f014ba4a09400fe462c39d#file-minimalontologyfile-owl

@Locke
Copy link
Contributor Author

Locke commented Jun 4, 2018

I created an enriched ontology (that's no longer minimal) for a better understanding: https://gist.github.com/Locke/c275b45823f014ba4a09400fe462c39d#file-enrichedontologyfile-owl

Interestingly, when I add the range TransitionCondition to hasTransitionCondition the NPE doesn't occur.

Some background of the ontology: Having both Action and State is an ongoing discussion on our side, also whether the Transition belongs to an Action or a State. As a compromise we currently have the SWRL rule (and also one not shown here for the other direction) to just have both. I don't think this should be problematic in owl though. I also can't see right now how the OverloadStrategy comes into play here.

@Galigator Galigator added the bug Developper confirm there is a bug in the product. label Jun 5, 2018
@Galigator
Copy link
Owner

Last commit should solve the problem in the 2.6.5-SNAPSHOT.

I need more time to investigate this case because the WSDL rule il complex to debug.

@Locke
Copy link
Contributor Author

Locke commented Jun 6, 2018

Great, that solved the NullPointerException also in my original ontology / application :)

I don't understand what you want to investigate further, so I leave this issue open for you to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Developper confirm there is a bug in the product.
Projects
None yet
Development

No branches or pull requests

2 participants