The metrics history API can generate graphs and then indeed it uses the built-in support in RRD4j for this, which in turn uses AWT.
The DejaVuSansMono.ttf font is packaged inside rrd4j-*.jar so it doesn’t have to exist in the filesystem. > On 23 Jan 2020, at 11:38, Jan Høydahl <[email protected]> wrote: > > Appears that rrd4j always tries to look for a font in the static > initialization of RrdGraphConstants: > https://github.com/rrd4j/rrd4j/blob/master/src/main/java/org/rrd4j/graph/RrdGraphConstants.java#L297 > > <https://github.com/rrd4j/rrd4j/blob/master/src/main/java/org/rrd4j/graph/RrdGraphConstants.java#L297> > It is looking for DejaVuSansMono.ttf. > > The MetricsHistoryIntegrationTest attempts a «get Grahp» in line 174, which > then instantiates RrdGraphDef. > > Should probably factor out the graph test as a separate test, which is only > run on systems with fonts installed. > > Jan > >> 23. jan. 2020 kl. 09:28 skrev Shalin Shekhar Mangar <[email protected] >> <mailto:[email protected]>>: >> >> I saw this as well on a Ubuntu Linux box running openjdk 11.0.6. The >> failures were 100% reproducible. >> >> I followed https://github.com/AdoptOpenJDK/openjdk-build/issues/682 >> <https://github.com/AdoptOpenJDK/openjdk-build/issues/682> and see that a >> suggestion is to install fontconfig package. Unfortunately this box is >> running an old version and I must upgrade to install fontconfig so I'll try >> that later. Putting this here just in case someone runs into it again. >> >> java -version >> openjdk version "11.0.6" 2020-01-14 >> OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10) >> OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode) >> >> On Tue, Dec 11, 2018 at 11:45 PM David Smiley <[email protected] >> <mailto:[email protected]>> wrote: >> I wonder why RRD4J is doing any AWT stuff at all. I thought we were just >> using it to *hold* data, not to visualize. ab? >> >> On Sun, Dec 9, 2018 at 3:27 AM Erick Erickson <[email protected] >> <mailto:[email protected]>> wrote: >> I reformatted the entire disk on my old machine and installed Mojave >> fresh then ran tests. >> >> MetricsHistoryIntegrationTest.testGet fails on my old (reformatted, >> freshly installed Mojave) with the bits below. It does _not_ fail on >> any other machine. >> >> Weird bits about: >> >> Caused by: java.lang.RuntimeException: java.io.IOException: Problem >> reading font data. >> >> Unfortunately it doesn't really say _which_ font. >> >> Anyone seen this before? I've seen a couple of references on the web >> to permissions in the tmp dir and downloading a particular font, but >> those have been fruitless. The tmp dir has the same permissions on >> both machines and the machine that succeeds doesn't even have the >> dejavu fonts suggested by StackOverflow. >> >> Any clues? >> >> [junit4] > Caused by: java.lang.RuntimeException: >> java.io.IOException: Problem reading font data. >> [junit4] > at >> org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:287) >> [junit4] > at >> org.rrd4j.graph.RrdGraphConstants.<clinit>(RrdGraphConstants.java:304) >> [junit4] > ... 11 more >> [junit4] > Caused by: java.io.IOException: Problem reading font data. >> [junit4] > at java.awt.Font.createFont0(Font.java:1000) >> [junit4] > at java.awt.Font.createFont(Font.java:877) >> [junit4] > at >> org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:283) >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> <mailto:[email protected]> >> For additional commands, e-mail: [email protected] >> <mailto:[email protected]> >> >> -- >> Lucene/Solr Search Committer (PMC), Developer, Author, Speaker >> LinkedIn: http://linkedin.com/in/davidwsmiley >> <http://linkedin.com/in/davidwsmiley> | Book: >> http://www.solrenterprisesearchserver.com >> <http://www.solrenterprisesearchserver.com/> >> >> -- >> Regards, >> Shalin Shekhar Mangar. >
