'Internal Server Error java.lang.NoClassDefFoundError Could not initialize class org.jfree.chart.JFreeChart' when Viewing Chart Gadget

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

An Internal Server Error message appears in a chart-based gadget.

The following appears in the atlassian-jira.log:

1 2 3 4 5 SEVERE: Internal server error java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart at org.jfree.chart.ChartFactory.createStackedBarChart(ChartFactory.java:679) at com.atlassian.jira.charts.jfreechart.StackedBarChartGenerator.generateChart(StackedBarChartGenerator.java:48) at com.atlassian.jira.charts.RecentlyCreatedChart.generateChart(RecentlyCreatedChart.java:91)

Cause

Generally, a NoClassDefFoundError occurs when a plugin is compiled against a JIRA version, then deployed against a different JIRA version that lacks a specific class definition.

In some cases, the versions may be correct, and an environment classloading issue has caused the error.

Resolution

  1. Restart JIRA. This will correct the environmental class-loading issue.

  2. Check that the Charting Plugin is compatible with the installed version of JIRA.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.