Skip to content
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 JRE 8 Font #46

Closed
joelchen opened this issue Jul 2, 2015 · 15 comments
Closed

NullPointerException in JRE 8 Font #46

joelchen opened this issue Jul 2, 2015 · 15 comments

Comments

@joelchen
Copy link

joelchen commented Jul 2, 2015

This Stack Overflow question and answer describes the issue. It only happens in JRE 8 but not in JRE 7.

@yosifkit
Copy link
Member

yosifkit commented Jul 2, 2015

I am not sure we would want to change away from the -headless packages. Why not just use the jdk versions, or extend the jre image in your Dockerfile and install the non-headless package?

@md5
Copy link
Contributor

md5 commented Jul 2, 2015

I'd like to see a test case to reproduce this. It sounds like the JRE is not running actually in headless mode.

@md5
Copy link
Contributor

md5 commented Jul 3, 2015

I was able to reproduce this: https://gist.github.com/md5/7fb07efafee3802da457

It looks like installing libfontconfig1 is a workaround (see the gist).

@yosifkit
Copy link
Member

yosifkit commented Jul 6, 2015

@md5, what do you suggest? Do you think we should add libfontconfig1 to the jre image or should we just point out that a user may need to add libs like this to their images?

@tianon
Copy link
Member

tianon commented Jul 6, 2015 via email

@md5
Copy link
Contributor

md5 commented Jul 6, 2015

I think what @tianon said is correct. This seems to be a missing dependency that should be fixed at the Debian level. I don't have time at the moment to investigate why this may have changed between openjdk-7-jre-headless and openjdk-8-jre-headless or to report it to debian-java@lists.debian.org, but I think that's what needs to happen.

The problem I see with simply adding libfontconfig1 is that without determining the root cause of why it's no longer being installed, it's quite likely that there could be other missing libraries that we don't know about yet that are waiting to crop up. Still, if it's enough of an issue for enough people, adding the libfontconfig1 package seems like a pretty unobtrusive move.

One suspicion I have is that something moved from a dependency to a "recommends", resulting in a bunch of packages being dropped. I'm also wondering whether something might have happened during the Jessie backport process to mess up the dependencies.

@yosifkit
Copy link
Member

yosifkit commented Jul 6, 2015

As far as I can tell, this is a packaging issue. Here are the depends that get libfontconfig1 for java 7 and 8:

openjdk-7-jre-headless -> libfontconfig1
# it is a direct dependency

openjdk-7-jre -> libfontconfig1
# also has longer paths to require libfontconfig1

openjdk-8-jre-headless -> # no fontconfig

openjdk-8-jre -> libatk-wrapper-java-jni -> libcairo2 -> libfontconfig1
# the shortest path to require it

@joelchen
Copy link
Author

I have just filed a bug report with Debian.

@md5
Copy link
Contributor

md5 commented Jul 23, 2015

Thanks @joelchen! 👍

@md5
Copy link
Contributor

md5 commented Aug 20, 2015

@tianon @yosifkit What do you guys think of putting in a temporary fix for this, since there doesn't seem to be much movement on the Debian front.

I just got an error report for the jetty image for this same issue: appropriate/docker-jetty#15.

@yosifkit
Copy link
Member

Sounds fine to me.

@tianon
Copy link
Member

tianon commented Aug 20, 2015

@md5 totally throwing that in now unless you beat me to it 😉

@md5
Copy link
Contributor

md5 commented Aug 20, 2015

@tianon I was thinking about creating a PR when I got back from lunch, but there's no need now. Thanks.

@tianon
Copy link
Member

tianon commented Aug 20, 2015 via email

@joelchen
Copy link
Author

Thanks @md5, @tianon, and @yosifkit! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants