OwlExporter 3.1 produces NullPointerException in method populateOntology


Hey,
i loaded the demo application in Gate 7 which ran fine. Then i modified the pipeline by adding modules like Numbers Tagger and Measurement Tagger as well as modifying some Gazetteer lists and JAPE grammars to better match my use case.
The application still ran flawlessly on demo.txt. But when i provide my own corpus with a single example text i get the following exception
- OWLExporter Message: OWLExporter Started.............
- exportFilePathStr: /C:/Program%20Files/GATE_Developer_7.0/plugins/OwlExporter/gate/application-resources/ontologies/patient_out.owl
- Running Single OWL File Export Mode.
- WARNING: [Local Folder Repository] The specified file must be a directory. (C:\Program Files\GATE_Developer_7.0\plugins\edu.stanford.smi.protegex.owl) -- LocalFolderRepository.update()
- Loading triples from: null
- Completed triple loading after 0 ms
- Postprocess: Process entities with incorrect Java type (0 entities) ... 0 ms
- Postprocess: Process metaclasses (3 metaclasses) ... 0 ms
- Postprocess: Process subclasses of rdf:List (1 classes) ... 0 ms
- Postprocess: Instances with multiple types (0 instances) ... 0 ms
- Postprocess: Add inferred superclasses ... 0 ms
- Postprocess: Process orphan classes (2 classes) ... 0 ms
- Postprocess: Generalized Concept Inclusion (0 axioms) ... 0 ms
- Postprocess: Abstract classes... 0 ms
- Postprocess: Domain and range of properties... 0 ms
- Postprocess: Possibly typed entities (0 resources) ... 0 ms
- Updating underlying frames model in 0 ms
- Sep 24, 2012 10:26:24 AM edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser doFinalPostProcessing
- INFO: Updating underlying frames model in 0 ms
- OWLExporter Message: Annotation ID: 1858
- info.semanticsoftware.owlexporter.exception.PopulatorException: Error: populateOntology java.lang.NullPointerException
- at info.semanticsoftware.owlexporter.OwlExporterOntologyPopulator.populateOntology(OwlExporterOntologyPopulator.java:206)
- at info.semanticsoftware.owlexporter.OwlExporter.execute(OwlExporter.java:269)
- at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:291)
- at gate.creole.SerialController.runComponent(SerialController.java:221)
- at gate.creole.SerialController.executeImpl(SerialController.java:153)
- at gate.creole.SerialAnalyserController.executeImpl(SerialAnalyserController.java:118)
- at gate.creole.AbstractController.execute(AbstractController.java:75)
- at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:291)
- at gate.gui.SerialControllerEditor$RunAction$1.run(SerialControllerEditor.java:1619)
- at java.lang.Thread.run(Unknown Source)
- OWLExporter info.semanticsoftware.owlexporter.exception.PopulatorException: Error: populateOntology java.lang.NullPointerException
I can process this same text with the demo application though.
While debugging i discovered that the local variable idProp (OWLDatatypeProperty) in OwlExporterOntologyPopulator must still be null when the call "addUnionDomainClass" is happening.
Do you have any idea what i am doing wrong? Is there a configuration mistake that can lead to such a behaviour?
Thank you!
- Login to post comments
Lingering exportNLPOntology file
Thanks for identifying this.
Turns out this is an NLP related issue not properly handled in the code. Chances are there is a lingering exportNLPOntology (i.e.: nlp_out.owl) on the file system from previous runs regardless of the exportNLP runtime parameter that might be configured.
If so, simply rename or remove this nlp_out.owl to get you past this.
Yeah, I forgot to mention
Yeah, I forgot to mention that i switched the exportNLP parameter to false.
Anyway, deleting the export files was indeed the solution, thank you :) !
After playing around a bit yesterday, loading several applications and corpora it suddenly worked but i couldn't explain why. It's interesting though that i received a clearer Exception later on which seems to be related to this situation. I don't remember the message exactly anymore but it told me something like "output file already exists, either select a different file or delete it".
Thanks for helping me out!