question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't show graph in springboot with alpine-jdk

See original GitHub issue

Java:

openjdk version "1.8.0_131"
OpenJDK Runtime Environment (IcedTea 3.4.0) (Alpine 8.131.11-r2)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

Stack:

java.lang.NullPointerException: null
      at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
      at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
      at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
      at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
      at sun.font.SunFontManager$2.run(SunFontManager.java:431)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.font.SunFontManager.<init>(SunFontManager.java:376)
      at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
      at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
      at sun.reflect.GeneratedConstructorAccessor238.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.lang.Class.newInstance(Class.java:442)
      at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
      at java.awt.Font.getFont2D(Font.java:491)
      at java.awt.Font.access$000(Font.java:224)
      at java.awt.Font$FontAccessImpl.getFont2D(Font.java:228)
      at sun.font.FontUtilities.getFont2D(FontUtilities.java:180)
      at sun.font.StandardGlyphVector.initFontData(StandardGlyphVector.java:1126)
      at sun.font.StandardGlyphVector.init(StandardGlyphVector.java:1115)
      at sun.font.StandardGlyphVector.<init>(StandardGlyphVector.java:172)
      at java.awt.Font.getStringBounds(Font.java:2421)
      at java.awt.Font.getStringBounds(Font.java:2331)
      at java.awt.Font.getStringBounds(Font.java:2365)
      at org.jrobin.graph.ImageWorker.getStringWidth(ImageWorker.java:166)
      at org.jrobin.graph.RrdGraph.getSmallFontCharWidth(RrdGraph.java:594)
      at org.jrobin.graph.RrdGraph.initializeLimits(RrdGraph.java:319)
      at org.jrobin.graph.RrdGraph.createGraph(RrdGraph.java:88)
      at org.jrobin.graph.RrdGraph.<init>(RrdGraph.java:59)
      at net.bull.javamelody.internal.model.JRobin.graph(JRobin.java:260)
      at net.bull.javamelody.internal.web.MonitoringController.doGraph(MonitoringController.java:385)
      at net.bull.javamelody.internal.web.MonitoringController.doReport(MonitoringController.java:189)
      at net.bull.javamelody.internal.web.MonitoringController.doActionIfNeededAndReport(MonitoringController.java:160)
      at net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:396)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:200)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
liyuankuicommented, Nov 30, 2017

Sorry, my bad, it should be

apk --update add \
    fontconfig \
    ttf-dejavu 
2reactions
evernatcommented, Oct 31, 2017

In some case (strange characters in graphs), it has helped to install DejaVu fonts like this: yum install dejavu-sans-fonts.noarch dejavu-sans-mono-fonts.noarch.

That said, the docker-library/openjdk issue is closer to your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker alpine + oracle java: cannot find java - Stack Overflow
Save this question. Show activity on this post. I've been trying to create an alpine-based docker image with Oracle Java (rather than openjdk)....
Read more >
How we find and fix OOM and memory leaks in Java Services
This service is a Java application built with Spring Boot in a Docker container ... The graph shows the memory pattern of the...
Read more >
Graph - Spring Boot With High-chart - YouTube
This video explain you how to generate dynamic graph usingHigh- chart API#JavaTechie # SpringBoot #HighChartTechnology : Spring boot ...
Read more >
Dashboard, Graphs and Charts in SpringBoot with Chart.js
This is part 62 of our complete application in Spring Boot. In this part, we will begin implementation of dynamic graphs and charts...
Read more >
[Solved]-Unable to run './mvnw clean install' when building ...
Coding example for the question Unable to run './mvnw clean install' when building docker image based on "openjdk:8-jdk-alpine" for Spring Boot app-docker.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found