Jasper on Tomcat 6/CentOS 6 can’t find fonts

On a new CentOS 6 VM with Tomcat 6, Jasper failed to find the fonts with this error:

java.lang.Error: Probable fatal error:No fonts found.
        at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1089)
        at sun.font.FontManager.initialiseDeferredFont(FontManager.java:961)
        at sun.font.FontManager.findOtherDeferredFont(FontManager.java:900)
        at sun.font.FontManager.findDeferredFont(FontManager.java:917)
        at sun.font.FontManager.findFont2D(FontManager.java:1914)

You can solve this by installing the default fonts:

tomcat# yum -y install liberation* urw-fonts
tomcat# service tomcat6 restart

For Ubuntu, you can check this.