Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55320

Using the { shortcut to add a macro fails with 'java.lang.ArrayIndexOutOfBoundsException: 0' error


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 6.2.4, 6.3.3, 6.4.0, 6.4.3, 6.6.1, 6.8.1
    • None


      Attempting to insert a macro using the { shortcut fails.


      • Red Hat Enterprise Linux (RHEL) 7.4

      Steps to Reproduce

      1. Edit a page
      2. Attempt to add a macro using the { shortcut

      Expected Results

      The macro suggestions menu is shown

      Actual Results

      The following error is displayed in the browser

      The below exception is thrown in the atlassian-confluence.log file:

      2017-08-24 11:25:44,364 ERROR [http-nio-8090-exec-18] [ContainerBase.[Standalone].[localhost].[/]] log Unhandled exception occurred whilst decorating page
       -- referer: http://confluence:8090/pages/resumedraft.action?draftId=4096191&draftShareId=ceb30906-49f4-4e30-af94-c6c6c363f1df | url: /plugins/servlet/confluence/placeholder/macro | traceId: b23e4a0f2ec9b8cd | userName: admin
      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.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:863)


      The default font was changed from Utopia to Styx in RHEL 7.4, this is not handled well by the JVM and breaks functionality. For more information see Bug 1484079 – AWT java apps fail to start when stix-fonts is used as sans-serif font


      1. Stop Confluence
      2. Create /etc/fonts/local.conf
      3. Paste the following:
        <?xml version='1.0'?>
        <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
      4. Save the file
      5. Start Confluence
        • In some cases, the fonts are not installed and we'll still run into these errors. Use the method appropriate for your distribution to install these fonts, for example:
          sudo yum install dejavu-serif-fonts

            Unassigned Unassigned
            sbrannen@atlassian.com Branno
            3 Vote for this issue
            7 Start watching this issue