protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
1.02k stars 231 forks source link

InvocationTargetException thrown when loading an older version of the plant trait ontology #853

Open csnyulas opened 5 years ago

csnyulas commented 5 years ago

I get this exception in v5.5.0-beta-9, when trying to load the plant-trait-ontology, from a local git repo cloned from github (https://github.com/Planteome/plant-trait-ontology/) as of a certain commit 11bb1305eabecd3c02e8f7d25e6c55a108c7c4ba from Aug 2016.

------------------------------- Loading Ontology ------------------------------- 
Loading ontology from file:/home/csnyulas/git/plant-trait-ontology/plant-trait-ontology.obo 
No instantiation found for org.semanticweb.owlapi.model.OWLOntologyBuilder arg0 
Instantiation failed 
java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_191]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_191]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_191]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_191]
    at org.semanticweb.owlapi.utilities.Injector.instantiate(Injector.java:347) [owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.semanticweb.owlapi.utilities.Injector.lambda$load$6(Injector.java:292) [owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_191]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_191]
    at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175) ~[na:1.8.0_191]
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_191]
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_191]
    at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) ~[na:1.8.0_191]
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_191]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_191]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_191]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_191]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_191]
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_191]
    at org.semanticweb.owlapi.utilities.Injector.inject(Injector.java:205) [owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.obolibrary.obo2owl.OwlStringTools.translate(OwlStringTools.java:113) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.obolibrary.obo2owl.OWLAPIObo2Owl.trHeaderFrame(OWLAPIObo2Owl.java:570) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.obolibrary.obo2owl.OWLAPIObo2Owl.tr(OWLAPIObo2Owl.java:382) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.obolibrary.obo2owl.OWLAPIObo2Owl.convert(OWLAPIObo2Owl.java:328) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:88) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:83) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:58) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:221) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1262) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1215) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1172) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:104) ~[na:na]
    at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$0(OntologyLoader.java:62) ~[na:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_191]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_191]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_191]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
Caused by: java.lang.IllegalStateException: value cannot be null at this stage
    at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:61) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at org.semanticweb.owlapi.util.OWLAPIPreconditions.verifyNotNull(OWLAPIPreconditions.java:40) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.<init>(OWLOntologyFactoryImpl.java:61) ~[owlapi-osgidistribution.jar:4.5.9.2019-02-01T07:24:44Z]
    ... 36 common frames omitted
Adding folder to ontology catalog: /home/csnyulas/git/plant-trait-ontology 
Imported ontology document http://purl.obolibrary.org/obo/po.owl was resolved to Optional[file:/home/csnyulas/git/plant-trait-ontology/imports/po_import.obo] by the ontology catalog. 
Finished loading imported ontology at file:/home/csnyulas/git/plant-trait-ontology/imports/po_import.obo 
Imported ontology document http://purl.obolibrary.org/obo/to/imports/chebi_import.owl was resolved to Optional[file:/home/csnyulas/git/plant-trait-ontology/imports/chebi_import.owl] by the ontology catalog. 
Finished loading imported ontology at file:/home/csnyulas/git/plant-trait-ontology/imports/chebi_import.owl 
csnyulas commented 5 years ago

This may or may not be a Protege problem. It may be a problem with the ontology. I think I got this ontology while experimentating with DOS-DP, and following the instructions in their tutorial.

In any case, I still find the exception confusing and cryptic.