-
Notifications
You must be signed in to change notification settings - Fork 236
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
NPE in sun.awt.FontConfiguration.getVersion(...) #75
Comments
@dinogun Is this something that was stripped out or something we missed in the base JDK/JRE that we give you? |
@ChristianCiach Are you testing the Alpine images as well ? If yes, do these tests fail there as well ? Want to make sure that we add this in both if needed, though I am not sure if the GUI usecase makes sense in the Alpine case. |
This is probably just me being incompatible with mondays, but I can't find any Alpine images on Docker Hub. Strange, I was sure they were there before. |
You should find them here, specifically the tag |
@ChristianCiach It happens the same with me too. Both |
Adding a simple
I asume that the simple |
I checked further. I linked it into Second: I had to set Now it works. |
Experiencing the same. Installing |
@jcoetzee have you checked my solution, setting the |
@gamma Just tried and it works even without creating the simple |
For those wondering, the workaround can be summarised as
|
Installing packages fontconfig and urw-fonts on CentOS 6 & 7 fixed the issue. |
I wasn't able to get it working just with the workaround as described by @jcoetzee. I had to softlink a few additional libraries as well to make the JVM happy. Full workaround (tested with
|
@ReillyProcentive |
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
Above fixes for me too. |
This made it work for me:
I'm using the |
For AdoptOpenJDK developers here is a reliable way to reproduce the issue (using the
public class Main {
public static void main(String[] args) {
System.loadLibrary("fontconfig");
}
} This fails with the error:
Interestingly this fails in both the AdoptOpenJDK and Alpine docker images ( After you link the first library ( If you run
Interestingly AdoptOpenJDK seemingly ignores these and is thus unable to load A third issue seems to be present in JDK11 builds but not JDK 8 builds. This issue is that Java seems to fatally exit if Error message:
|
This should fix the error with e.g. Apache POI that we use for handling excel sheets. AdoptOpenJDK/openjdk-docker#75
With adoptopenjdk/openjdk8:alpine-jre I had to do this to have X11 (java app GUI) redirected to the host: Adding fontconfig did not solve the NPE. Instead I had to add a font package (here I added ttf-dejavu). |
Closing this issue in favor of a more specific one for Alpine since this appears to be resolved for all other platforms. If you have a specific docker image of ours that does not work, please raise a separate issue. |
It worked perfectly for me. You rock! Tested on adoptopenjdk/openjdk11:alpine-jre |
Sorry to re-open this issue, but it was never mentioned the following image: The same stack trace as the OP happens when using the After digging I stumbled upon many 'fixes', including this GitHub Issue, but all suggested fixes didn't work. The same stack trace continues to happen. Further help would be appreciated! |
Amazon Corretto is a completely different build of the JDK than the AdoptOpenJDK builds (now known as Adoptium), and is supported by a completely different vendor (Amazon). I don't know what support resources Corretto has, but you should utilize them instead. |
Figured as much, but posted it here just in case someone passes by this popular GitHub issue can see that I mentioned it in a different thread, and also stated that I had the same issue but with a different JDK! Also, if anyone here happens to have a light, it'd be appreciated. But I'm not expecting much truthfully. |
We have some unit tests that create GUI components. Some of these fail with this stacktrace when using
adoptopenjdk/openjdk11:latest
:This is not a new issue, as seen here: docker-library/openjdk#46
This workaround also applies here: docker-library/openjdk@0f82de1 . You just have to install the package libfontconfig1 to fix this issue.
The text was updated successfully, but these errors were encountered: