I am planning to generate .xlsx type report instead of .xls kind, so upgraded jasperreport3.0.0 to jasperreport 4.0.0.
After change in code accordingly i am able to generate reports in .xlsx format on my local windows env. But when i deploy it on unix box it gave me below exception.
" net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM."
In order to resolve above issue i manually installed true type fonts on the unix and it started working.
Now i am deploying same .EAR file and required jar files on other server , install msttffonts manually like before, reports are again not able to generate and getting same issue
" net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM.".
Both unix boxes are of same version and also same jboss version pointing to same jdk.
can anybody help me what i am doing wrong here or m i missing any configuration.
3 Answers:
When you want to add a new font, you ideally need to create a font jar, add it in your package. You can use iReport to create a font jar.
Open iReport, go to Tools-> options ->Fonts, click on install font, browse for ttf files for different styles (like bold, italic etc) then check on the option for embeding this font in the PDF documnet and then say Finish. It will install the font in iReport. Now you can select the font and click on Export as extension. Give a name for font jar (like ariel.jar) and save.
You have to add this font jar in your package so that JVM gets this when required irrespective of deploying server or environment.
i have tried this as well and put the jar file in jboss lib folder and when ran the report same issue.
BTW what do you mean by package with your application?
when that .jar solution did not work i installed font on one unix machine , it worked. but when installing another unix machine for UAT, JVM is again not picking fonts.