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

OWLAPI 4.5.24 throws seemingly irrelevant error #1088

Closed
matentzn opened this issue Feb 10, 2023 · 2 comments
Closed

OWLAPI 4.5.24 throws seemingly irrelevant error #1088

matentzn opened this issue Feb 10, 2023 · 2 comments
Assignees

Comments

@matentzn
Copy link
Contributor

When processing OWL constructs outside of OBO spec, a nasty error is through which pollutes our Log files:

Minimal example:

Prefix(:=<urn:unnamed:ontology#ont1>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/fbbt/patterns/definitions.owl>
<http://purl.obolibrary.org/obo/fbbt/releases/2023-02-08/patterns/definitions.owl>

SubClassOf(<http://purl.obolibrary.org/obo/FBbt_00001599> ObjectIntersectionOf(<http://purl.obolibrary.org/obo/FBbt_00052517> <http://purl.obolibrary.org/obo/FBbt_00111673>))

)

Run for example:

robot convert -i error-log-test.owl -f obo -o error-log.obo

And you will see a nasty error message:

ERROR No instantiation found for org.semanticweb.owlapi.model.OWLOntologyBuilder arg0
ERROR Instantiation failed
java.lang.reflect.InvocationTargetException: null
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.semanticweb.owlapi.utilities.Injector.instantiate(Injector.java:364)
        at org.semanticweb.owlapi.utilities.Injector.lambda$load$5(Injector.java:297)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.semanticweb.owlapi.utilities.Injector.inject(Injector.java:209)
        at org.obolibrary.obo2owl.OwlStringTools.translate(OwlStringTools.java:71)
        at org.obolibrary.obo2owl.OWLAPIOwl2Obo.tr(OWLAPIOwl2Obo.java:321)
        at org.obolibrary.obo2owl.OWLAPIOwl2Obo.convert(OWLAPIOwl2Obo.java:286)
        at org.semanticweb.owlapi.oboformat.OBOFormatRenderer.render(OBOFormatRenderer.java:55)
        at org.semanticweb.owlapi.oboformat.OBOFormatStorer.storeOntology(OBOFormatStorer.java:42)
        at org.semanticweb.owlapi.util.AbstractOWLStorer.store(AbstractOWLStorer.java:99)
        at org.semanticweb.owlapi.util.AbstractOWLStorer.storeOntology(AbstractOWLStorer.java:64)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1527)
        at org.obolibrary.robot.IOHelper.saveOntologyFile(IOHelper.java:1752)
        at org.obolibrary.robot.IOHelper.saveOntology(IOHelper.java:866)
        at org.obolibrary.robot.CommandLineHelper.maybeSaveOutput(CommandLineHelper.java:667)
        at org.obolibrary.robot.ConvertCommand.execute(ConvertCommand.java:141)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:244)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:188)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:135)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:61)
Caused by: java.lang.IllegalStateException: value cannot be null at this stage
        at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:61)
        at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:40)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.<init>(OWLOntologyFactoryImpl.java:59)
        ... 30 common frames omitted

The OBO result looks correct though:

format-version: 1.2
data-version: fbbt/releases/2023-02-08/patterns/definitions.owl
ontology: fbbt/patterns/definitions
owl-axioms: Prefix(owl:=<http://www.w3.org/2002/07/owl#>)\nPrefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)\nPrefix(xml:=<http://www.w3.org/XML/1998/namespace>)\nPrefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\nPrefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)\n\n\nOntology(\nDeclaration(Class(<http://purl.obolibrary.org/obo/FBbt_00001599>))\nDeclaration(Class(<http://purl.obolibrary.org/obo/FBbt_00052517>))\nDeclaration(Class(<http://purl.obolibrary.org/obo/FBbt_00111673>))\n############################\n#   Classes\n############################\n\n# Class: <http://purl.obolibrary.org/obo/FBbt_00001599> (<http://purl.obolibrary.org/obo/FBbt_00001599>)\n\nSubClassOf(<http://purl.obolibrary.org/obo/FBbt_00001599> ObjectIntersectionOf(<http://purl.obolibrary.org/obo/FBbt_00052517> <http://purl.obolibrary.org/obo/FBbt_00111673>))\n\n\n)

[Term]
id: FBbt:00001599

This needs to be fixed in OWL API, keeping this here only for tracking.

@matentzn matentzn changed the title OWLAPI 1.2.24 throws seemingly irrelevant error OWLAPI 1.5.24 throws seemingly irrelevant error Feb 10, 2023
@jamesaoverton jamesaoverton changed the title OWLAPI 1.5.24 throws seemingly irrelevant error OWLAPI 4.5.24 throws seemingly irrelevant error Feb 10, 2023
hkir-dev added a commit to hkir-dev/owlapi that referenced this issue Feb 12, 2023
@hkir-dev
Copy link
Contributor

Fix PR created: owlcs/owlapi#1091

@jamesaoverton
Copy link
Member

Resolved by #1093

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

3 participants