SentinelDataHub / dhus-distribution

The Data Hub System is a Java web based system designed to manage the on-line dissemination of Earth Observation Satellites data.
http://sentineldatahub.github.io/DataHubSystem/
GNU Affero General Public License v3.0
68 stars 36 forks source link

2.7.8-osf fails to start with Java minor versions greater than 255 #10

Closed ericloewe closed 2 years ago

ericloewe commented 2 years ago

Attempting to run DHuS 2.7.8-osf with a recent JRE 8 (e.g. build 1.8.0_302-8u302-b08-0ubuntu2-b08 as packaged for Ubuntu 21.10 Impish Indri) fails immediately due to an exception during the version check:

[2.7.8-osf][2021-12-07 19:25:16,508][INFO ] Data Hub Service initialization... (DHuS.java:260 - main) [2.7.8-osf][2021-12-07 19:25:16,520][INFO ] dhus-distribution 2.7.8-osf (DHuS.java:261 - main) [2.7.8-osf][2021-12-07 19:25:16,520][INFO ] dhus-core 1.11.1-osf (DHuS.java:262 - main) [2.7.8-osf][2021-12-07 19:25:16,521][INFO ] DRB 2.5.10 (DHuS.java:263 - main) [2.7.8-osf][2021-12-07 19:25:16,854][ERROR] Uncaught exception (UncaughtExceptionHandler.java:37 - main) java.lang.ExceptionInInitializerError at com.ibm.icu.impl.UPropertyAliases.<clinit>(UPropertyAliases.java:87) at com.ibm.icu.lang.UCharacter.<clinit>(UCharacter.java:5680) at com.hp.hpl.jena.rdf.arp.impl.CharacterModel.isComposingChar(CharacterModel.java:134) at com.hp.hpl.jena.rdf.arp.impl.ParserSupport.checkComposingChar(ParserSupport.java:140) at com.hp.hpl.jena.rdf.arp.states.AbsWantLiteralValueOrDescription.characters(AbsWantLiteralValueOrDescription.java:45) at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.characters(XMLHandler.java:156) at org.apache.xerces.parsers.AbstractSAXParser.characters(Unknown Source) at org.apache.xerces.impl.XMLNamespaceBinder.characters(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.characters(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(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:106) at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:215) at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:202) at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:272) at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:230) at com.hp.hpl.jena.ontology.OntDocumentManager.findMetadata(OntDocumentManager.java:1010) at com.hp.hpl.jena.ontology.OntDocumentManager.initialiseMetadata(OntDocumentManager.java:968) at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:205) at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:187) at com.hp.hpl.jena.ontology.OntDocumentManager.<init>(OntDocumentManager.java:171) at com.hp.hpl.jena.ontology.OntDocumentManager.getInstance(OntDocumentManager.java:249) at com.hp.hpl.jena.ontology.OntModelSpec.getDocumentManager(OntModelSpec.java:389) at com.hp.hpl.jena.ontology.impl.OntModelImpl.getDocumentManager(OntModelImpl.java:181) at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:152) at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:124) at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:402) at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:361) at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:344) at fr.gael.cortex.CortexModel.loadDefaultOntModel(CortexModel.java:216) at fr.gael.cortex.CortexModel.<init>(CortexModel.java:351) at fr.gael.cortex.CortexModel.getDefaultModel(CortexModel.java:195) at fr.gael.drbx.cortex.DrbCortexModel.<init>(DrbCortexModel.java:439) at fr.gael.drbx.cortex.DrbCortexModel.getDefaultModel(DrbCortexModel.java:179) at fr.gael.dhus.DHuS.start(DHuS.java:154) at fr.gael.dhus.DHuS.main(DHuS.java:292) Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255 at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:188) at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65) at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69) ... 41 more [2.7.8-osf][2021-12-07 19:25:16,864][ERROR] Uncaught exception (UncaughtExceptionHandler.java:37 - Thread-1) java.lang.NullPointerException at fr.gael.dhus.spring.context.ApplicationContextProvider.getBean(ApplicationContextProvider.java:54) at fr.gael.dhus.DHuS$1.run(DHuS.java:130) at java.lang.Thread.run(Thread.java:748)

Replacing icu4j-3.4.4.jar with icu4j-69_1.jar from the official website allows the init process to proceed past this point (it then fails later apparently due to an unrelated bug).

ericloewe commented 2 years ago

I've confirmed that simply updating icu4j to the latest version fixes this. The remaining issue was caused by a bad config file.

nivalette commented 2 years ago

Handled issue in future OSF release (not the 2.7.9-osf, but the next one).

I also confirm that running DHuS with a Java minor version lower than 255 is working. (used java 1.8 202 to validate this release)