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.

  • 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,
  • GitHub comment 73#207815611
    via GitHub by md5
    ,
    • java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219) at sun.awt.FontConfiguration.init(FontConfiguration.java:107) at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774) at sun.font.SunFontManager$2.run(SunFontManager.java:431) at java.security.AccessController.doPrivileged(Native Method) at sun.font.SunFontManager.<init>(SunFontManager.java:376) at sun.awt.FcFontManager.<init>(FcFontManager.java:35) at sun.awt.X11FontManager.<init>(X11FontManager.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83) at java.security.AccessController.doPrivileged(Native Method) at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) at sun.font.SunFontManager.getInstance(SunFontManager.java:250) at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264) at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113) at javax.swing.JComponent.getFontMetrics(JComponent.java:1626) at javax.swing.text.PlainView.calculateLongestLine(PlainView.java:639) at javax.swing.text.PlainView.updateMetrics(PlainView.java:209) at javax.swing.text.PlainView.updateDamage(PlainView.java:527) at javax.swing.text.PlainView.insertUpdate(PlainView.java:451) at javax.swing.text.FieldView.insertUpdate(FieldView.java:293) at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610) at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201) at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748) at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707) at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130) at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669) at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669) at javax.swing.JFormattedTextField$AbstractFormatter.install(JFormattedTextField.java:948) at javax.swing.text.DefaultFormatter.install(DefaultFormatter.java:125) at javax.swing.text.InternationalFormatter.install(InternationalFormatter.java:285) at javax.swing.JFormattedTextField.setFormatter(JFormattedTextField.java:464) at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:788) at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:501) at es.estoes.wallpaperDownloader.window.WallpaperDownloader.initializeGUI(WallpaperDownloader.java:814) at es.estoes.wallpaperDownloader.window.WallpaperDownloader.initialize(WallpaperDownloader.java:426) at es.estoes.wallpaperDownloader.window.WallpaperDownloader.<init>(WallpaperDownloader.java:160) at es.estoes.wallpaperDownloader.window.WallpaperDownloader$1.run(WallpaperDownloader.java:149) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,