java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • set JAVA default font (NOT IN CODE, BUT JRE)
    via Stack Overflow by AsyncCode
    ,
  • openjdk-8 is missing liberation_ttf
    via GitHub by pSub
    ,
  • Java Swing Null Pointer Exception
    via Stack Overflow by Erel Segal Halevi
    ,
  • Cannot load font in JRE 8
    via Stack Overflow by Khanetor
    ,
  • unable to start hudson after upgrade
    via by Akina86,
  • 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.
    via by Pete Batard,
    • java.lang.NullPointerException: null at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)[na:1.8.0_60] at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)[na:1.8.0_60] at sun.awt.FontConfiguration.init(FontConfiguration.java:107)[na:1.8.0_60] at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:776)[na:1.8.0_60] at sun.font.SunFontManager$2.run(SunFontManager.java:431)[na:1.8.0_60]

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,