Sunday, 05 June 2011 07:19

Linux - not for the faint hearted

Written by  Kamal Shah
Rate this item
(0 votes)
I am currently deploying a WebObjects application on an Ubuntu server. Yes, yes, I am very brave. But I have help, so it has not been that difficult.

What has been problematic is something that we take for granted - fonts.

Yes, Ubuntu and many flavors of Linux have no fonts installed. Yes, you read that right. No fonts. Period.

But little Kamal did not realize that and he set upon a mission. Of generating reports on a WebObjects application on Ubuntu using ReportMill.

App was deployed. First there was some issue with the WebServerResources. None of them were being read. I figured out that WO WebServerResources are stored in some other folder - not the regular document root of Apache on Ubuntu. Then I got the app working with the WebServerResources.

Then I tested the app and got an exception when I tried to generate the report. The exception was something about a font class not being found:

Could not initialize class com.reportmill.text.RMFont:java.lang.NoClassDefFoundError: Could not initialize class com.reportmill.text.RMFont

At first I thought that the ReportMill jar is not being found. Trust java to come up with some weird exceptions! Class not being found it said. Wait till you hear about what the reason for the exception was!

I contacted Shravan Kumar Mahankali, the best WO guy in India. The genius that he is, he immediately pointed out that the problem was not with the jar since the Font class was being recognized (otherwise we would have got a much higher level class not being found).

A little googling told us that in Ubuntu no fonts were installed by default. And we would have to install the basic fonts too. Some more googling and a lot of trials and errors later, I found that the command:

sudo apt-get install msttcorefonts

solved the problem!

I really wonder why even the basic fonts are not installed in this platform! Heck, I used good old Arial! Event that wasn't present. Despite all the changes, Linux continues to be a geek's OS. Not for the rest of us. 


Kamal Shah

Kamal Shah

Hello, I'm Kamal from Hyderabad, India. I have been on dialysis for the last 13 years, six of them on PD, the rest on hemo. I have been on daily nocturnal home hemodialysis for the last four and half years. I can do pretty much everything myself. I love to travel and do short weekend trips or longer trips to places which have dialysis centers. Goa in India is a personal favorite. It is a great holiday destination and has two very good dialysis centers.

E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
back to top