CA Spectrum Install fails on Linux RHEL 7.4 with Java error: ExceptionInInitializerError

Document ID : KB000008747
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Java Error: "ExceptionInInitializerError", when starting Spectrum upgrade on Redhat 7.4

Environment:
Spectrum 10.2.1RedHat 7.4
Cause:

When running an install on RHEL 7.4 the install GUI is opening up after "setuplin.exe" and after the first "progress bar" is nearly done, the error pops up:

(basically after a few seconds from starting the upgrade).

 

Launching installer... 

 

Invocation of this Java Application has caused an ExceptionInInitializerError. This application will now exit. (LAX) 

 

Stack Trace: 

java.lang.ArrayIndexOutOfBoundsException: 0 

at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75) 

at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93) 

at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359) 

at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350) 

at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302) 

at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:250) 

at sun.awt.SunToolkit.getFontMetrics(SunToolkit.java:649) 

at Flexeraasf.ab(Unknown Source) 

at Flexeraasf.<clinit>(Unknown Source) 

at com.zerog.ia.installer.LifeCycleManager.a6(Unknown Source) 

at com.zerog.ia.installer.LifeCycleManager.a3(Unknown Source) 

at com.zerog.ia.installer.LifeCycleManager.executeApplication(Unknown Source) 

at com.zerog.ia.installer.Main.main(Unknown Source) 

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 

at java.lang.reflect.Method.invoke(Method.java:498) 

at com.zerog.lax.LAX.launch(Unknown Source) 

at com.zerog.lax.LAX.main(Unknown Source) 

This Application has Unexpectedly Quit: Invocation of this Java Application has caused an ExceptionInInitializerError. This application will now exit. (LAX) 

Resolution:

Redhat 7.4 has changed the font configuration with Java. The following link explains a solution on how to change the font being used as default in Redhat 7.4: 

https://stackoverflow.com/questions/45569367/upgrade-rhel-from-7-3-to-7-4-arrayindexoutofboundsexception-in-sun-font-composi 

 

Solution mention: 

####################################### 

RHEL v7.4 (upgraded from v7.3 or fresh install) comes with package stix-fonts. 

When this package is installed, the default font changed from Utopiato STIX So, java now default fonts are mapped to STIX, including thesans-seriffont family 

For whatever reason, the STIX fonts does not seem to play well with java (openjdk+ IBM JDK) and cause exceptions and bad calculated artefacts positionning when using java.awt, which is the case with JasperReports 

We ended creating a file name /etc/fonts/local.conf with this in order to force back Utopia as the default font, used by java.. 

 

<?xml version='1.0'?> 

<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> 

<fontconfig> 

<alias> 

<family>serif</family> 

<prefer><family>Utopia</family></prefer> 

</alias> 

<alias> 

<family>sans-serif</family> 

<prefer><family>Utopia</family></prefer> 

</alias> 

<alias> 

<family>monospace</family> 

<prefer><family>Utopia</family></prefer> 

</alias> 

<alias> 

<family>dialog</family> 

<prefer><family>Utopia</family></prefer> 

</alias> 

<alias> 

<family>dialoginput</family> 

<prefer><family>Utopia</family></prefer> 

</alias> 

</fontconfig> 

#######################################