PavlidisLab / Gemma

Genomics data re-analysis
Apache License 2.0
23 stars 6 forks source link

Suppress JenaException when the ontology service initialization thread is interrupted #587

Closed arteymix closed 1 year ago

arteymix commented 1 year ago

In 1.29.6 (and 1.30.0) we started interrupting the initialization thread when the OntologyService bean is disposed. When that occurs, Jena can raise an exception with the stacktrace below. This should be suppressed.

Exception in thread "uberonOntology_load_thread_IHB9O" com.hp.hpl.jena.shared.JenaException: com.hp.hpl.jena.rdf.arp.impl.XMLHandler$1publicId: http://purl.obolibrary.org/obo/uberon.owl; lineNumber: 36; columnNumber: 84; {E302} Interrupt detected.
    at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:60)
    at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:51)
    at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:211)
    at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:185)
    at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:180)
    at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.startElement(XMLHandler.java:121)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:155)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:173)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:160)
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:199)
    at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:229)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2126)
    at ubic.basecode.ontology.OntologyLoader.loadMemoryModel(OntologyLoader.java:290)
    at ubic.basecode.ontology.OntologyLoader.loadMemoryModel(OntologyLoader.java:173)
    at ubic.basecode.ontology.providers.AbstractOntologyMemoryBackedService.loadModel(AbstractOntologyMemoryBackedService.java:97)
    at ubic.basecode.ontology.providers.AbstractOntologyService.getModel(AbstractOntologyService.java:461)
    at ubic.basecode.ontology.providers.AbstractOntologyService$OntologyInitializationThread.run(AbstractOntologyService.java:93)
Caused by: com.hp.hpl.jena.rdf.arp.impl.XMLHandler$1publicId: http://purl.obolibrary.org/obo/uberon.owl; lineNumber: 36; columnNumber: 84; {E302} Interrupt detected.
    ... 26 more

Process finished with exit code 255
arteymix commented 1 year ago

This is fixed in baseCode next patch release.

https://github.com/PavlidisLab/baseCode/commit/15e15563a2aae63188ad07b0e8a6c093ad573f1f