Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67092

Jira dashboard gadgets fail to render and instead display 'An internal server error occurred when requesting resource' error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.8.0
    • Dashboard & Gadgets

    Description

      Summary

      Multiple gadgets and reports such as Time Since Chart, Average Chart and etc will not load with the message "An internal server error occurred when requesting resource" shown instead.

      Environment

      • Red Hat Enterprise Linux (RHEL) 7.4

      Steps to Reproduce

      1. Attempt to view a dashboard with a Time Since Chart

      Expected Results

      The dashboard is displayed and all gadgets are rendered

      Actual Results

      A 'An internal server error occurred when requesting resource' message is shown instead of the gadget.

      The below exception is thrown in the xxxxxxx.log file:

      
      2017-09-04 19:54:11,205 http-nio-8080-exec-6 ERROR admin 1194x753x1 ae48vd 10.252.221.186,10.60.1.104 /rest/gadget/1.0/averageage/generate [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
      at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
      at sun.font.Font2D.getFontMetrics(Font2D.java:415)
      at java.awt.Font.defaultLineMetrics(Font.java:2176)
      at java.awt.Font.getLineMetrics(Font.java:2246)
       
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351) at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81) at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62) at sun.font.CompositeFont.getMapper(CompositeFont.java:409) at sun.font.StandardGlyphVector.init(StandardGlyphVector.java:1122) at sun.font.StandardGlyphVector
      

      Notes

      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

      Workaround

      1. Stop Jira
      2. Create /etc/fonts/local.conf
      3. Paste the following:
        <?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>
        
      4. Save the file
      5. Start Jira

      If the above does not fix the issue, install the dejavu-serif-fonts by running the following:

      sudo yum install dejavu-serif-fonts
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbrannen@atlassian.com Branno
              Votes:
              14 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: