当我在开发环境(SunOS 5.10 i86pc Solaris)中启动我的脚本时出现以下异常,我尝试在谷歌上搜索数小时尝试各种建议的解决方法,但没有解决问题。事实上,当我启动脚本时尝试使用超级用户会生成报告,而对于普通用户,我会得到以下异常并且不会生成报告。
Caused by: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.
at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:108)
at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:128)
at net.sf.jasperreports.engine.fonts.SimpleFontFace.getInstance(SimpleFontFace.java:67)
at net.sf.jasperreports.engine.fonts.SimpleFontFamily.setNormal(SimpleFontFamily.java:99)
at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:261)
at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(SimpleFontExtensionHelper.java:232)
at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:193)
at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:162)
at net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:56)
at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:110)
at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83)
... 40 more
Caused by: java.io.IOException: Problem reading font data.
at java.awt.Font.createFont(Font.java:967)
at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:100)
... 50 more
我注意到文件写入临时文件夹(/var/tmp)的权限设置为 600,如何在 Jasper Report 中设置这些文件必须的权限?还是我应该重新检查 /bin/java 的权限?