Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jasper reports font error

I am using Jasper Reports 5.2.0 and Spring MVC with Maven.

I have done reports using JasperViewer, but suddenly I am getting this error that can't be resolved:

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '
        net/sf/jasperreports/fonts/pictonic/pictonic.ttf
        net/sf/jasperreports/fonts/pictonic/pictonic.svg
        net/sf/jasperreports/fonts/pictonic/pictonic.eot
        net/sf/jasperreports/fonts/pictonic/pictonic.woff
    ' is not available to the JVM. See the Javadoc for more details.
like image 468
madhav Avatar asked Feb 14 '23 07:02

madhav


2 Answers

Delete the jar extra placed jars in your lib folder it works properly or use same version jar file in maven dependency and webroot ->lib folder or in class path

like image 178
madhav Avatar answered Mar 11 '23 05:03

madhav


For me, in one instance, the problem was with the jasperreports version as I had more that one jasperreports jar in my classpath.

My reports were compiled with jasperreports-5.6.0 and in my classpath jasperreports-4.1.1.jar was also included and accidentally jasperreports-4.1.1.jar was "up" in the Build class path order.

Actually, my eclipse project had jasperreports-5.6.0 as a library jar and this project had another project as "Required projects in the build path" that contained the old version of jasperreports.

I moved the jasperreports-5.6.0 to "Up in the build classpath order" than the old version, and the problem got resolved.

Again, later I removed the project dependency and got the problem resolved as well.

So check, whether you have more than one jasperreports library anyhow; if so, remove the unnecessary duplicate jar.

like image 39
shamsuddin Avatar answered Mar 11 '23 04:03

shamsuddin