vishalmestri Posted July 27, 2012 Share Posted July 27, 2012 I am using jboss application server.Jasper version - 4.5JDK - 1.6Created a report and deployed on jboss running on linux.We are using Arial font , hence we created extension jar and included in WEB-IN/lib folder. Now we are getting issue- java.io.IOException: Problem reading font data. at java.awt.Font.createFont(Font.java:924) at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:69) at net.sf.jasperreports.engine.fonts.SimpleFontFamily.createFontFace(SimpleFontFamily.java:316) at net.sf.jasperreports.engine.fonts.SimpleFontFamily.setNormal(SimpleFontFamily.java:85) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:243) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(SimpleFontExtensionHelper.java:214) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:183) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:152) at net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:55) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:110) at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83) at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:52) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) I can not share jrxml file due to privacy issue.But the what i did put arial font ttf file in JDK/jre/lib/fonts/ folder.And wrote core java prog and it is running successfully.But when I run through JBOSS it is giving above mentioend issue. Kindly help its urgent.Post Edited by vishalmestri at 07/27/2012 05:54 Link to comment Share on other sites More sharing options...
tlauber Posted October 22, 2012 Share Posted October 22, 2012 I exactly had the same behavour and after playing around with fonts and font-extensions I ended up with building my own jasperreports-jar for digging purposes:I discovered that the errormessage was completely misleading and that the root cause originated from java.awt.Front not beeing able to write the Java-temp-directory (java.io.tmpdir). In my case this was the temp-directory of the tomcat-installation.After having changed the permissions of the tomcat-temp-directory everything ran like expected. Link to comment Share on other sites More sharing options...
torekj Posted November 7, 2013 Share Posted November 7, 2013 I had the exact same problem on my system. Changed permissions of tomcat temp-dir and error was gone! You saved my day Link to comment Share on other sites More sharing options...
adrianalungu Posted January 8, 2014 Share Posted January 8, 2014 I too had the same problem. Worked with your solution. Thanks a bunch! Link to comment Share on other sites More sharing options...
sareljbotha Posted February 5, 2014 Share Posted February 5, 2014 I had to add this to the Tomcat startup options:-Djava.awt.headless=true Link to comment Share on other sites More sharing options...
ulugbu Posted May 16, 2015 Share Posted May 16, 2015 Oh God, you saved my day! I have been trying to figure out this since yesterday. That `java.awt.headless=true` property didn't work for me. It was working fine on my local dev machine, but not working on the qa server. All I had to do is to create the Tomcat temp folder manually and it worked like a charm. I have been searching about this online since yesterday and I feel really lucky to find this answer. Thanks again! +1 Link to comment Share on other sites More sharing options...
yuezhao Posted June 3, 2015 Share Posted June 3, 2015 Yes, I have the same situation. It does work!! Thanks! Link to comment Share on other sites More sharing options...
Pixel Posted August 17, 2016 Share Posted August 17, 2016 If you're using SYS V init scripts and running in a container such a Tomcat, DON'T start the script directly with: sudo /etc/init.d/tomcat7 startThat will start it without a clean environment.Instead, use the service command: sudo /sbin/service tomcat7 start Link to comment Share on other sites More sharing options...
nadams_1 Posted November 16, 2017 Share Posted November 16, 2017 Just to help anyone else out, I had the same problem and it turned out to be that I had deleted the tomcat temp directory and tomcat 7 apparently won't recreate it. Created apache-tomcat-7.0.82temp and it started working again. Link to comment Share on other sites More sharing options...
jasperj Posted October 1, 2019 Share Posted October 1, 2019 In my particular case, after I had upgraded Ubuntu 18.04 server version, the reported issue started to happen. The font was already present on the Ubuntu Server. I had to run fc-cache -f -v to clear the font cache. however, I had to first apt install fontconfig and then run c-cache -f -v to resolve the issue. Link to comment Share on other sites More sharing options...
Ralph Posted October 13, 2021 Share Posted October 13, 2021 thanks a lot ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now