-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException in Alpine JRE 8 Font #73
Comments
This is probably the same issue as #46, which was fixed in #48. It looks like the relevant package may be called |
As in the Debian case, I think the best fix is actually to add a dependency to the |
Iʼm not sure. I added the fontconfig package as a test, you can see the message, |
Right. Sorry I missed that part in your original message. The weird thing is that that error message comes from I took a look at the source code for OpenJDK 8 and traced back that NPE (the starting point is here). It looks like the proximate issue is that there is no I'm not sure the apparent warning from As an additional data point, when I call I didn't dig into Debian's packaging of |
It may be worth pulling |
Thinking about it some more, I think the Fontconfig warning happens because “C” is only one character long and the code expects 2-3 characters. There is code earlier in the function that deals with plain “C”, but the codeset qualifier causes that code to be skipped. Still not sure how Debian is different here (assuming it doesn't also show that warning). |
I looked through the |
I see now that the Debian
And here's what I see on Debian:
|
It seems like the underlying issue is that
The Debian-based image has just enough fonts to support the default JDK fonts, it seems:
These fonts come from the |
@jasonmader Try installing the Update: There are 124 MiB of packages in the image total after adding
|
Thanks, that works. |
Also, I added |
@jasonmader I don't think that the base |
This doesn’t appear to be a locale setting for |
FYI: Same problem seems to afflict openjdk:9-jdk (9-b158) workaround as noted in #48 ...
|
Due to some standard fonts missing, JRE was failing to load the fonts. DejaVu fonts are added to mitigate this, as per: docker-library/openjdk#73 (comment) Additionally, the Source Code Pro fonts are added. They look somewhat better and are used by [reftree](https://github.com/stanch/reftree).
Due to some standard fonts missing in the SBT runner image, the JVM was failing to load the fonts when running any font-related code. DejaVu fonts are added to mitigate this, as per: docker-library/openjdk#73 (comment) Additionally, the Source Code Pro fonts are added. They look somewhat better and are used by [reftree](https://github.com/stanch/reftree).
Due to some standard fonts missing in the SBT runner image, the JVM was failing to load the fonts when running any font-related code. DejaVu fonts are added to mitigate this, as per: docker-library/openjdk#73 (comment) Additionally, the Source Code Pro fonts are added. They look somewhat better and are used by [reftree](https://github.com/stanch/reftree).
|
As of today we are still getting this error with Jdk 10 on alpine. It works fine on debian when we install
|
AFAICT 8-jre-alpine still has that issue. 8-jre-slim works as expected. |
Quite hard to debug and find the source of this error. For me it even crashed with diverse errors (which I paste, so somebody might find it on Google):
or
(I think there had also been a NullPointerException, but I could not find it anymore.) Adding I wonder if this could also be an upstream issue for the OpenJDK developers, as throwing those Exceptions is really not helpful to point out that there are fonts missing. |
Ran into this issue. Thanks to this issue for providing detailed information. Seeing md5's comment on how it adds 20 MB to the image, I suppose there's no way that would be the solution to provide support by default. Is there a lead about a sustainable fix? |
Maybe you could provide a "_with_fonts" image along with the current images? |
I don't think a |
Shouldn't the alpine version of openjdk behave the same way as the other versions? I realize that adding ttf-dejavu to the image would mean increasing its size by an extra 20MiB. Fixing the problem is easy enough (if you happen to find this thread), but the big issue for many people, it seems, is tracking down the source of the problem when you encounter it. |
full ack @jnunderwood |
@debuglevel would you like to open a PR at https://github.com/docker-library/docs/blob/master/openjdk/content.md? |
Conda-installed tools such as fastqc hanging but not exiting. see docker-library/openjdk#73
makes a call that leads to sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) See: docker-library/openjdk#73 Also needed to edit accessibility.properties to eliminate 'Assistive Technology not found' error. See https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror
This comment has been minimized.
This comment has been minimized.
Raporttien lataaminen kaatuu puuttuvaan fonttiin, tarkemmat lisätiedot docker-library/openjdk#73 (comment)
JVM Version: 1.8.0_77-internal-alpine-r0-b03
The text was updated successfully, but these errors were encountered: