Oracle Installer fails with [EXCEPTION]:java.lang.reflect.InvocationTargetException under RedHat 7.4

Posted by Dirk Nachbar on Tuesday, September 19, 2017
I recently had a customer with a fresh installed RedHat 7.4 system on which we wanted to install different Oracle Software in graphical mode, like Oracle Database 12.1.0.2.0, Oracle WebLogic Server 12.2.1.3.0 and Oracle Data Integrator 12.2.1.3.0.

Following error occured when we were starting the Oracle Installers, either runInstaller or java -jar fmw_12.2.1.3.0_odi.jar:

export JAVA_HOME=/u00/app/oracle/product/jdk1.8.0_131
export PATH=$JAVA_HOME/bin:$PATH
cd /u00/app/oracle/install
java -jar fmw_12.2.1.3.0_odi.jar
Launcher log file is /tmp/OraInstall2017-09-19_09-12-33AM/launcher2017-09-19_09-12-33AM.log.
Extracting the installer . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 3191.776 MHz    Passed
Checking monitor: must be configured to display at least 256 colors.   Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 8191 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 5139 MB    Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2017-09-19_09-12-33AM
Log: /tmp/OraInstall2017-09-19_09-12-33AM/install2017-09-19_09-12-33AM.log
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.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
        at javax.swing.text.GlyphPainter1.sync(GlyphPainter1.java:226)
        at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:59)
        at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:592)
        at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:732)
        at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:233)
        at javax.swing.text.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:717)
        at javax.swing.text.html.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:157)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
        at javax.swing.text.html.ParagraphView.getMinimumSpan(ParagraphView.java:270)
        at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
        at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
        at javax.swing.text.html.BlockView.getMinimumSpan(BlockView.java:378)
        at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
        at javax.swing.text.html.BlockView.calculateMinorAxisRequirements(BlockView.java:146)
        at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
        at javax.swing.text.BoxView.getPreferredSpan(BoxView.java:545)
        at javax.swing.text.html.BlockView.getPreferredSpan(BlockView.java:362)
        at javax.swing.plaf.basic.BasicHTML$Renderer.<init>(BasicHTML.java:383)
        at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:67)
        at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:207)
        at javax.swing.plaf.basic.BasicLabelUI.propertyChange(BasicLabelUI.java:417)
        at oracle.bali.ewt.olaf2.OracleLabelUI.propertyChange(OracleLabelUI.java:53)
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
        at java.awt.Component.firePropertyChange(Component.java:8428)
        at javax.swing.JLabel.setText(JLabel.java:330)
        at oracle.as.install.engine.modules.presentation.ui.common.label.ModifiedJLabel.setText(ModifiedJLabel.java:183)
        at oracle.as.install.engine.modules.presentation.ui.screens.WelcomeWindow.jbInit(WelcomeWindow.java:309)
        at oracle.as.install.engine.modules.presentation.ui.screens.WelcomeWindow.<init>(WelcomeWindow.java:112)
        at oracle.as.install.engine.modules.presentation.action.LaunchWelcomeWindowAction.execute(LaunchWelcomeWindowAction.java:86)
        at oracle.as.install.engine.modules.presentation.util.ActionQueue.run(ActionQueue.java:70)
        at oracle.as.install.engine.modules.presentation.PresentationModule.prepareAndRunActions(PresentationModule.java:281)
        at oracle.as.install.engine.modules.presentation.PresentationModule.launchModule(PresentationModule.java:235)
        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 oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:580)
        at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:522)
        at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:471)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:717)
java.lang.reflect.InvocationTargetException
        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 oracle.as.install.engine.InstallEngine.launchModule(InstallEngine.java:580)
        at oracle.as.install.engine.InstallEngine.processAndLaunchModules(InstallEngine.java:522)
        at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:471)
        at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:717)
Caused by: java.lang.ExceptionInInitializerError
        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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
        at javax.swing.UIDefaults.getUI(UIDefaults.java:769)
        at javax.swing.UIManager.getUI(UIManager.java:1016)
        at javax.swing.JComboBox.updateUI(JComboBox.java:266)
        at javax.swing.JComboBox.init(JComboBox.java:231)
        at javax.swing.JComboBox.<init>(JComboBox.java:183)
        at oracle.help.DefaultNavigatorPanel$MinimumSizedComboBox.<init>(DefaultNavigatorPanel.java:791)
        at oracle.help.DefaultNavigatorPanel.<init>(DefaultNavigatorPanel.java:106)
        at oracle.help.Help._initHelpSystem(Help.java:1045)
        at oracle.help.Help.<init>(Help.java:243)
        at oracle.help.Help.<init>(Help.java:200)
        at oracle.help.Help.<init>(Help.java:125)
       at oracle.as.install.engine.modules.presentation.ui.common.help.WizardHelpManager.configure(WizardHelpManager.java:77)
        at oracle.as.install.engine.modules.presentation.action.WizardHelpConfigAction.execute(WizardHelpConfigAction.java:246)
        at oracle.as.install.engine.modules.presentation.util.ActionQueue.run(ActionQueue.java:70)
        at oracle.as.install.engine.modules.presentation.PresentationModule.prepareAndRunActions(PresentationModule.java:281)
        at oracle.as.install.engine.modules.presentation.PresentationModule.launchModule(PresentationModule.java:235)
        ... 8 more
Caused by: 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.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
        at javax.swing.text.PlainView.calculateLongestLine(PlainView.java:639)
        at javax.swing.text.PlainView.updateMetrics(PlainView.java:209)
        at javax.swing.text.PlainView.updateDamage(PlainView.java:527)
        at javax.swing.text.PlainView.insertUpdate(PlainView.java:451)
        at javax.swing.text.FieldView.insertUpdate(FieldView.java:293)
        at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
        at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
        at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
        at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
        at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
        at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
        at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
        at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669)
        at javax.swing.JTextField.<init>(JTextField.java:243)
        at javax.swing.JTextField.<init>(JTextField.java:183)
        at com.jgoodies.looks.plastic.PlasticComboBoxUI.<clinit>(PlasticComboBoxUI.java:88)
        ... 33 more
[ERROR]: Installer has encountered an internal Error. Contact Oracle support with details
[EXCEPTION]:java.lang.reflect.InvocationTargetException

All required Linux Packages were present on the new RedHat 7.4 System and the JDK were the correct and certified Version.

The most interesting lines in the above error stack are:

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)


RedHat comes with Release 7.4 (either fresh installed or updated) with the so called stix-fonts packages. This will change the default font Utopia to STIX, which is causing than finally the above error stack. This affects only Oracle Software installations in graphical mode, when you are installing your Oracle Software in silent mode you will not hit this Problem.

The solution is really simple, just create under /etc/fonts a file called local.conf with following content:

<?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>

And now you can install your Oracle Software without any problems.