NPE at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)

Caused by: java.lang.NullPointerException
        at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
        at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
        at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
        at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:367)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.desktop/sun.font.SunFontManager.(SunFontManager.java:312)
        at java.desktop/sun.awt.FcFontManager.(FcFontManager.java:35)
        at java.desktop/sun.awt.X11FontManager.(X11FontManager.java:56)
        ... 88 more

CentOS使用的时候报这个错,因为缺少字体

yum install -y fontconfig
yum install -y urw-fonts

安装字体后,重启tomcat就可以了

你可能感兴趣的:(NPE at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262))