Support Article
NullPointerException on exporting data to PDF
SA-103434
Summary
Error occurs on exporting data to PDF using any report definition.
Error Messages
Caused by: java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262) ~[?:?]
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225) ~[?:?]
at sun.awt.FontConfiguration.init(FontConfiguration.java:107) ~[?:?]
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719) ~[?:?]
at sun.font.SunFontManager$2.run(SunFontManager.java:367) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at sun.font.SunFontManager.<init>(SunFontManager.java:312) ~[?:?]
at sun.awt.FcFontManager.<init>(FcFontManager.java:35) ~[?:?]
at sun.awt.X11FontManager.<init>(X11FontManager.java:56) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:84) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) ~[?:?]
at sun.font.SunFontManager.getInstance(SunFontManager.java:247) ~[?:?]
Steps to Reproduce
- Execute any report definition.
- Export the data to PDF.
Root Cause
A defect in Pegasystems’ code or rules.
Issue in the Java Runtime Environment. Pega Platform 8.3.1 Docker image uses adoptopenjdk.
Resolution
Perform the following local-change:
- Add the below instruction in the Docker file.
RUN apt-get update && apt-get install -y --no-install-recommends fontconfig
- Build a new image.
Perform the below steps if the user does not want to build a new image,
- Log in to the container running Pega.
- Run the below command,
apt-get update && apt-get install -y --no-install-recommends fontconfig
- Restart the Tomcat server.
Published August 4, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.