I\'m trying to display my reports on the browser , but I keep getting this error:
There are 2 steps to solve this problem.
-Djaav.awt.headless=true in startup script or vm options
Install the fonts
yum install fontconfig
Then you can verify
rpm -qa | grep font
fontpackages-filesystem-1.44-8.el7.noarch
dejavu-fonts-common-2.33-6.el7.noarch
fontconfig-2.13.0-4.3.el7.x86_64
dejavu-sans-fonts-2.33-6.el7.noarch
This is on CentOS 7. We had been using Google Noto fonts and thought that we do not need any font installation but was wrong.
I've faced the same issue on my development machine. Basically it was happened due to problem in application server (Apache tomcat)
Basically I've accidentally deleted the "temp" folder in server root. So jasper cant compile the report and proceed with the report generation.
this may be problems with memory, reboot the server.
I got this error while deploying springboot app (including jasper reporting) in docker container.The problem was with openjdk:8-jdk-alpine which I used for building docker container environment. That has a bug in fonts support. Therefore I switched to openjdk:8-jre (or OpenJDK 7 versions will also help) and it worked for me. I spent days to fix this bug.
In our case it helped to delete the temp server (thus making sure there are no jar duplicities) and restart server. Hint: try this in case if the error starts occurring after a new release (but worked before and nothing relevant changed in the release)
For me the issue was regarding a bug in AdoptOpenJDK
: https://github.com/AdoptOpenJDK/openjdk-build/issues/682
I fixed the issue by installing ttf-dejavu
manually in my dockerfile
FROM adoptopenjdk/openjdk8:alpine-jre
# Workaround for wrong font configuration in adoptopenjdk
# https://github.com/AdoptOpenJDK/openjdk-build/issues/682
RUN apk update && apk upgrade \
&& apk add --no-cache ttf-dejavu \
# Install windows fonts as well. Not required..
&& apk add --no-cache msttcorefonts-installer \
&& update-ms-fonts && fc-cache -f
AND by running the application with the flag -Djava.awt.headless=true