NoClassDefFoundError when executing Jaspersoft Reports
search cancel

NoClassDefFoundError when executing Jaspersoft Reports

book

Article ID: 372047

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

When executing a report from Advanced Reporting, an error is thrown. The following message is visible in the jasperserver.log:

java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser

Environment

  • Jaspersoft 8.1.1
  • Linux OS

Cause

Missing fonts in the Virtual Machine that hosts Jaspersoft Server.

Resolution

Jaspersoft Server can use any of the fonts available to its JVM. Fonts available to the JVM can be determined by executing a Java Program.

To solve the issue:

  1. Contact your system administrator to install required fonts
  2. Restart the Jaspersoft Server thereafter

Additional Information

Following is a sample set of steps on how fonts can be installed in Rocky Linux:

  1. Run the following commands to install commonly used fonts:
    • sudo dnf install redhat-display-fonts
    • sudo dnf install redhat-mono-fonts
    • sudo dnf install redhat-text-fonts
  2. Install an additional package that provides the fc-cache command:
    • sudo dnf install fontconfig
  3. Run the following command to refresh fonts cache:
    • fc-cache -f -v