Getting a System Error screen when adding a comment or answer into any Question
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
Summary
When a user adds a comment or answer to an existing question in Questions for Confluence, a System Error is triggered in the Confluence UI.
Environment
Confluence 7.19
Diagnosis
Reviewing the atlassian-confluence.log
files, you can find the following NoClassDefFoundError related to org/jsoup/safety/Whitelist
class:
1
2
3
4
5
6
7
2023-07-31 08:58:44,753 ERROR [https-jsse-nio2-8443-exec-806] [[Standalone].[localhost].[/confluence].[action]] log Servlet.service() for servlet [action] in context with path [/confluence] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoClassDefFoundError: org/jsoup/safety/Whitelist
at com.atlassian.confluence.plugins.questions.util.JsoupUtils.isBlankExcludingHtmlTags(JsoupUtils.java:9)
at com.atlassian.confluence.plugins.questions.actions.AnswerQuestionAction.execute(AnswerQuestionAction.java:45)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
...
...
Cause
The Whitelist class has been removed completely in Jsoup 1.15.1 library, Safelist class should be used instead.
Solution
Atlassian engineering team already implemented this change in Questions for Confluence plugin when implement the fix for:
In order to solve this issue, follow these steps:
Upgrade your Questions for Confluence to v3.3.2 or older
Browse to General Configuration > Manage Apps
Search for Questions for Confluence and click on Update
Clear the plugins cache following the KBHow to clear the apps (plugins) cache in Confluence Data Center.
Was this helpful?