NullPointerException on Linux systems triggered by font lookup on specific Java version

Following previous advice from support, we have packaged the groupdocs modules in a standalone Java app, the main goal being to avoid crashing the app server when document conversion crashes.

We have recently fount that the following NPE occurs while running on Java 17, but does not occur on Java 8; see stack trace for details.
The conversion process runs on a Debian bookworm box; fonts have been installed and checked; however, seeing that changing the java version allows the document conversion to run, one’s conclusion is that it’s not a missing font problem.

java.lang.NullPointerException: null
        at java.base/java.util.Objects.requireNonNull(Objects.java:209) ~[na:na]
        at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:263) ~[na:na]
        at java.base/java.nio.file.Path.of(Path.java:147) ~[na:na]
        at java.base/java.nio.file.Paths.get(Paths.java:69) ~[na:na]
        at com.groupdocs.viewer.fonts.k.E(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.domain.documents.E.b(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.domain.documents.i.a(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.Viewer.a(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.Viewer.a(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.domain.f.b.a(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]
        at com.groupdocs.viewer.Viewer.view(Unknown Source) ~[groupdocs-total-25.12.jar:25.12]

The problem can be easily addressed by using a Java 8 setup, but it will reach its end-of-life in a not-so-distant future, so any help or suggestions is appreciated.

Best regards.

Hello @stefanu123 ,

Thank you for the detailed information and for providing the stack trace.

To help us investigate this issue, could you please share the following information, if possible?

  • The Dockerfile (or Docker image configuration) used for your Java 17 environment.
  • A code sample demonstrating, where the exception occurs.
  • If possible, the input document that consistently reproduces the problem.

Having these details will allow us to reproduce the issue in our environment and perform a thorough investigation.