-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 9.10.0, 9.12.4, 9.12.8
-
Component/s: Installation
-
9.1
-
2
-
Severity 2 - Major
-
20
Issue Summary
This is reproducible on Data Center: yes
Custom Plugins using the atlassian-renderer functionality fails with below Error:-
java.lang.NoClassDefFoundError: org/cyberneko/html/parsers/DOMFragmentParser at com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter.convertXHtmlToWikiMarkup(DefaultWysiwygConverter.java:346)
This Error is seen in Jira Software Version starting from 9.10 or Jira Service Management Version starting from 5.10
- Before JIRA 9.10 there were 2 JAR files for nekohtml located in:
/WEB-INF/lib/nekohtml-1.9.19.jar /WEB-INF/atlassian-bundled-plugins/nekohtml-1.9.12-1.jar
- From JIRA 9.10 there is only single JAR file in below location. It is because nekohtml library was bumped due to a vulnerability
/WEB-INF/atlassian-bundled-plugins/nekohtml-1.9.22-2.jar
Due to this, Plugins using the atlassian-renderer functionality fails with above NoClassDefFoundError.
Steps to Reproduce
- Install Jira version 9.12.x
- Install Scriptrunner plugin
- Run a script like below from Scriptrunner Console
Jira Administration>Scriptrunner>Consoleimport com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter String txtHtml = """ <ul><li>1</li><li>2</li><li>3</li></ul> """ return new DefaultWysiwygConverter().convertXHtmlToWikiMarkup(txtHtml);
- Error like below is observed
Expected Results
The script should run fine without the Error.
Actual Results
The below exception is thrown in the atlassian-jira.log file:
java.lang.NoClassDefFoundError: org/cyberneko/html/parsers/DOMFragmentParser at com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter.convertXHtmlToWikiMarkup(DefaultWysiwygConverter.java:346)
Workaround
As a workaround,
- Copy the nekohtml-1.9.22-2.jar" from location $JIRA_INSTALL/atlassian-jira/WEB-INF/atlassian-bundled-plugins/ to $JIRA_INSTALL/atlassian-jira/WEB-INF/lib which resolves the issue.
Note- The issue is already fixed in JIRA 10.X version where newer version of atlassian-renderer (9.0.3) is used and above script executes fine. A similar version of atlassian-renderer is required for Jira 9.x version.
- mentioned in
-
Page Loading...
