Context: Scenario is likely to occur in Linux environments *with no UI, attempting to export to an Excel file from an xDM collection results in an error vs successful export. Reviewing the error log, users may encounter errors similar to the one below, indicating an issue initializing specific classes.

Description of Error (Stack Trace/PDE Log)

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:398)

at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)

at java.base/java.security.AccessController.doPrivileged(Native Method)

at

java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)

at java.desktop/java.awt.Font.getFont2D(Font.java:497)

at java.desktop/java.awt.Font.canDisplayUpTo(Font.java:2250)

at java.desktop/java.awt.font.TextLayout.singleFont(TextLayout.java:469)

at java.desktop/java.awt.font.TextLayout.<init>(TextLayout.java:530)

at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:273)

The root cause of this issue is commonly found to be missing libraries, creating a scenario where FontManager class cannot be located and subsequently used. Scenario is common on Linux machines with no installed UI (headless).

Resolution: Resolve this issue by installing the missing packages, additional context on error and proposed solutions available in reference article.