Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-7270

Problem with AWT on Windows with AdoptJDK (avatars not displayed).

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 4.8.3
    • 4.8.0, 4.8.1
    • Runtime platform
    • None

    Description

      Information about the fix

      In order to have this issue resolved:

       * upgrade to Fisheye / Crucible 4.8.3 or higher AND
       * ensure you have 'Microsoft Visual C++ Redistributable' installed

      See the 'Notes' section below.

      Issue Summary

      When fisheye is installed as a service on Windows with AdoptJDK AWT doesn't work (avatars not displayed).

      Steps to Reproduce

      1. Spin up a fresh Windows machine. Tested on 2019 and 2012.
      2. Install AdoptJDK (8.0.242.08-hotspot)
      3. Install Fisheye
      4. open Services utility, make sure Fisheye is running or start it
      5. navigate to fisheye web ui and log in

      Expected Results

      Default avatar is displayed.

      Actual Results

      1) During Fisheye startup the following stack trace is logged:

      2020-04-30 08:15:13,815 WARN  - Problem initing graphics environment, images may not render
      java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
      	at com.cenqua.fisheye.ctl.Run.setLibraryProperties(Run.java:421) [fisheye.jar:?]
      	at com.cenqua.fisheye.ctl.BaseCommand.handleCommonArguments(BaseCommand.java:166) [fisheye.jar:?]
      	at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:74) [fisheye.jar:?]
      	at com.cenqua.fisheye.ctl.Run.main(Run.java:55) [fisheye.jar:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_252]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_252]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_252]
      	at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_252]
      	at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101) [fisheyeboot.jar:?]
      	at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44) [fisheyeboot.jar:?]
      

      2) When rendering a page containing an avatar, no image displayed and the below exception is thrown in the log file:

      javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
      	at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:285) [webwork-2.2.7-atlassian-37.jar:?]
      	at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) [webwork-2.2.7-atlassian-37.jar:?]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
      [...]
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_242]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_242]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_242]
      [...]
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
      	at com.atlassian.fisheye.gravatar.Charlatar.getImage(Charlatar.java:163) [fisheye.jar:?]
      	at com.atlassian.fisheye.gravatar.Charlatar.rndpart(Charlatar.java:159) [fisheye.jar:?]
      	at com.atlassian.fisheye.gravatar.Charlatar.createAvatar(Charlatar.java:71) [fisheye.jar:?]
      

      Workaround

      Install another JDK (Oracle) or use different way of installing service (nssm). 

      Notes

      1) Error during startup. OpenJDK around version 1.8.0 update 202, in the awt.dll library introduced a dependency on 'Microsoft Visual C++ Redistributable 2013'. Download and install this package from the Microsoft website (vcredist_x64.exe). Once installed, the java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit error from Fisheye's startup disappears.

      2) Error while generating an avatar. It's related with loading SPI modules by javax.imageio.ImageIO. Behaviour is random (stop + start resolves the issue in half of cases). Solving this requires an update to Fisheye/Crucible 4.8.3 or higher.

      Attachments

        Issue Links

          Activity

            People

              mparfianowicz Marek Parfianowicz
              aslaski Adam Slaski
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1h 52m
                  1h 52m