Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

前端 未结 19 2261
清酒与你
清酒与你 2020-12-10 01:32

I\'m trying to display my reports on the browser , but I keep getting this error:

\"enter

19条回答
  •  被撕碎了的回忆
    2020-12-10 01:59

    This can as well be caused by missing/inaccessible Java 'temp' directory. In Font.java, temp files are being created:

    Files.createTempFile("+~JF", ".tmp").toFile();
    

    On one system, the 'temp' dir was missing under Tomcat folder but Java was configured to use it:

    -Djava.io.tmpdir=C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\temp
    

    BTW. first time around, after restarting Tomcat, the service was actually throwing an IOException, but then JasperReports cached something and on subsequent calls the stack trace was exactly as reported here.

提交回复
热议问题