java.lang.NullPointerException

Jenkins JIRA | Pete Batard | 5 years ago
  1. 0

    After following the installation guide for Jenkins and using apt-get/aptitude to install jenkins 1.459 on Debian, I get the following error when accessing the server: AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"? java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1191) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:164) at sun.awt.FontConfiguration.<init>(FontConfiguration.java:89) at sun.awt.motif.MFontConfiguration.<init>(MFontConfiguration.java:50) at sun.awt.X11GraphicsEnvironment.createFontConfiguration(X11GraphicsEnvironment.java:941) at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:246) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:162) at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:252) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.font.FontManager.initSGEnv(FontManager.java:1118) at sun.font.FontManager.findFont2D(FontManager.java:1864) at java.awt.Font.getFont2D(Font.java:477) at java.awt.Font.getFamily(Font.java:1166) at java.awt.Font.getFamily_NoClientCode(Font.java:1140) at java.awt.Font.getFamily(Font.java:1132) at java.awt.Font.toString(Font.java:1629) at hudson.util.ChartUtil.<clinit>(ChartUtil.java:229) at hudson.WebAppMain.contextInitialized(WebAppMain.java:175) at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:875) at winstone.HostConfiguration.initWebApp(HostConfiguration.java:129) at winstone.HostConfiguration.<init>(HostConfiguration.java:71) at winstone.HostGroup.initHost(HostGroup.java:87) at winstone.HostGroup.<init>(HostGroup.java:47) at winstone.Launcher.<init>(Launcher.java:177) at winstone.Launcher.main(Launcher.java:384) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at Main._main(Main.java:273) at Main.main(Main.java:98) I tried adding JAVA_ARGS="-Djava.awt.headless=true" to the Jenkins configuration, but it didn't change anything. I also installed the ttf-dejavu font, but it also didn't solve the problem. The Jenkins log contains only the following: Running from: /usr/share/jenkins/jenkins.war Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME") Warning: default mime table not found: /usr/lib/jvm/java-6-openjdk/jre/lib/content-types.properties I see some suggestions of replacing openJDK with the Sun JDK, but I'd rather keep to the standard default Debian packages. The only parameter I edited from default is the 8080 port which was switched to 8081. Any help or ideas on how to solve this issue would be greatly appreciated.

    Jenkins JIRA | 5 years ago | Pete Batard
    java.lang.NullPointerException
  2. 0

    After following the installation guide for Jenkins and using apt-get/aptitude to install jenkins 1.459 on Debian, I get the following error when accessing the server: AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"? java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1191) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:164) at sun.awt.FontConfiguration.<init>(FontConfiguration.java:89) at sun.awt.motif.MFontConfiguration.<init>(MFontConfiguration.java:50) at sun.awt.X11GraphicsEnvironment.createFontConfiguration(X11GraphicsEnvironment.java:941) at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:246) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:162) at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:252) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.font.FontManager.initSGEnv(FontManager.java:1118) at sun.font.FontManager.findFont2D(FontManager.java:1864) at java.awt.Font.getFont2D(Font.java:477) at java.awt.Font.getFamily(Font.java:1166) at java.awt.Font.getFamily_NoClientCode(Font.java:1140) at java.awt.Font.getFamily(Font.java:1132) at java.awt.Font.toString(Font.java:1629) at hudson.util.ChartUtil.<clinit>(ChartUtil.java:229) at hudson.WebAppMain.contextInitialized(WebAppMain.java:175) at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:875) at winstone.HostConfiguration.initWebApp(HostConfiguration.java:129) at winstone.HostConfiguration.<init>(HostConfiguration.java:71) at winstone.HostGroup.initHost(HostGroup.java:87) at winstone.HostGroup.<init>(HostGroup.java:47) at winstone.Launcher.<init>(Launcher.java:177) at winstone.Launcher.main(Launcher.java:384) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at Main._main(Main.java:273) at Main.main(Main.java:98) I tried adding JAVA_ARGS="-Djava.awt.headless=true" to the Jenkins configuration, but it didn't change anything. I also installed the ttf-dejavu font, but it also didn't solve the problem. The Jenkins log contains only the following: Running from: /usr/share/jenkins/jenkins.war Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME") Warning: default mime table not found: /usr/lib/jvm/java-6-openjdk/jre/lib/content-types.properties I see some suggestions of replacing openJDK with the Sun JDK, but I'd rather keep to the standard default Debian packages. The only parameter I edited from default is the 8080 port which was switched to 8081. Any help or ideas on how to solve this issue would be greatly appreciated.

    Jenkins JIRA | 5 years ago | Pete Batard
    java.lang.NullPointerException
  3. 0

    unable to start hudson after upgrade

    Google Groups | 6 years ago | Akina86
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    AWT error while trying to build Jenkins Docker image based on Alpine -

    Stack Overflow | 8 months ago | Tony K
    hudson.util.AWTProblem: java.lang.NullPointerException
  6. 0

    GitHub comment 239#208772121

    GitHub | 8 months ago | carlossg
    hudson.util.AWTProblem: java.lang.NullPointerException

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at sun.awt.FontConfiguration.getVersion()
    2. Java RT
      Font.toString
      1. sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1191)
      2. sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:164)
      3. sun.awt.FontConfiguration.<init>(FontConfiguration.java:89)
      4. sun.awt.motif.MFontConfiguration.<init>(MFontConfiguration.java:50)
      5. sun.awt.X11GraphicsEnvironment.createFontConfiguration(X11GraphicsEnvironment.java:941)
      6. sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:246)
      7. java.security.AccessController.doPrivileged(Native Method)
      8. sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:162)
      9. sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:252)
      10. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      11. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      12. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      13. java.lang.reflect.Constructor.newInstance(Constructor.java:532)
      14. java.lang.Class.newInstance0(Class.java:372)
      15. java.lang.Class.newInstance(Class.java:325)
      16. java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
      17. sun.font.FontManager.initSGEnv(FontManager.java:1118)
      18. sun.font.FontManager.findFont2D(FontManager.java:1864)
      19. java.awt.Font.getFont2D(Font.java:477)
      20. java.awt.Font.getFamily(Font.java:1166)
      21. java.awt.Font.getFamily_NoClientCode(Font.java:1140)
      22. java.awt.Font.getFamily(Font.java:1132)
      23. java.awt.Font.toString(Font.java:1629)
      23 frames
    3. Hudson
      WebAppMain.contextInitialized
      1. hudson.util.ChartUtil.<clinit>(ChartUtil.java:229)
      2. hudson.WebAppMain.contextInitialized(WebAppMain.java:175)
      2 frames
    4. winstone
      Launcher.main
      1. winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:875)
      2. winstone.HostConfiguration.initWebApp(HostConfiguration.java:129)
      3. winstone.HostConfiguration.<init>(HostConfiguration.java:71)
      4. winstone.HostGroup.initHost(HostGroup.java:87)
      5. winstone.HostGroup.<init>(HostGroup.java:47)
      6. winstone.Launcher.<init>(Launcher.java:177)
      7. winstone.Launcher.main(Launcher.java:384)
      7 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:616)
      4 frames
    6. Unknown
      Main.main
      1. Main._main(Main.java:273)
      2. Main.main(Main.java:98)
      2 frames