I cannot load a font from an S3 Inputstream in JRE 8. I do not have issue if a system is installed with JRE 7, JDK 7, or even JDK 8.
val fontInputStream = s3
We also got that error when using tomcat:8.0.38-jre8-alpine. That image is missing the fontconfig.
Instead of switching to a different image you could also install the ttf-dejavu package.
apk add --update ttf-dejavu
I get the same error with openjdk:8-jre-alpine. Switching to openjdk:8-jre helps.
--- FROM openjdk:8-jre-alpine
+++ FROM openjdk:8-jre
I spent days suffering with it until I saw this github thread and made the night happy. it's practically calling GraphicsEnvironment again
link here
It turns out that this is a problem with the openjdk-8-jre-headless installation. This is the installation in the Docker image for java 8 JRE. I simply install openjdk-8-jre (without headless) and the problem goes away.
If you look at the error log, the loading of the font require awt X11, which is missing from headless version of JRE.
On CentOS headless JRE is missing the fontconfig dependency:
yum install fontconfig
Also one might need to install at least one font (dejavu, liberation, etc).
For me this resolved issue:
apt-get install -y libfontconfig1