launcher.gcr.io/google/jenkins2 does not draw chart

6/3/2018

I am using launcher.gcr.io/google/jenkins2 to run jenkins in gcp kubernetes engine.

Everything seems ok except that I get Could not initialize class org.jfree.chart.JFreeChart error for every chart that jenkins attempt to draw. I googled the error and almost everyone solves that with adding -Djava.awt.headless=true. As you can guess I already tried that and it does not work.

Ideas?

-- gsf
google-kubernetes-engine
jenkins
kubernetes

1 Answer

6/3/2018

One other possible solution/workaround is seen in JENKINS issue 39636:

I installed libxext6 libxrender1 fontconfig libfontconfig but it didn't help. After that I also installed libjfreechart-java but I still have the same problem.

Commenting out the assistive_technologies line in /etc/java-8-openjdk/accessibility.properties solved it.

You can see that recommendation in tianon's comment of that answer:

In my case it ended up being bugs.debian.org/798794 (from "Assistive technology not found error while building aprof-plot").
Adding "RUN sed -i 's/^assistive_technologies=/#&/' /etc/java-8-openjdk/accessibility.properties" to my Dockerfile fixed it. :)

-- VonC
Source: StackOverflow