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.
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.
... http://www.kamaldshah.com/2011/06/linux-not-for-faint-hearted.html