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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s