I need the class XML11Char provided by the JVM, and Confluence wasn’t configured to provide it.
Using Confluence 7.4.0 launched by Maven (hence running on AdoptOpenJDK 8, I’ve checked), I’m trying to run DaisyDiff, the library provided by Atlassian in Confluence, to diff two excerpts of HTML.
Unfortunately, it performs a static call to com.sun.org.apache.xml.internal.utils.XML11Char.isXML11ValidNCName() and fails with a NoClassDefFoundError.
It is because this class is supposed to be provided by the JVM 8, it is in the rt.jar, but Confluence doesn’t import it.
Has anyone solved this issue? Has anyone had to use another parser to create diffs?
Here is the stacktrace:
java.lang.NoClassDefFoundError: com/sun/org/apache/xml/internal/utils/XML11Char
at org.outerj.daisy.diff.helper.CleanBrokenAttributeQNamesHandler.filterBrokenQNameAttributes(CleanBrokenAttributeQNamesHandler.java:87)
at org.outerj.daisy.diff.helper.CleanBrokenAttributeQNamesHandler.startElement(CleanBrokenAttributeQNamesHandler.java:80)
at org.outerj.daisy.diff.helper.MergeCharacterEventsHandler.startElement(MergeCharacterEventsHandler.java:107)
at org.outerj.daisy.diff.helper.NekoHtmlParser$RemoveNamespacesHandler.startElement(NekoHtmlParser.java:133)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1164)
at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:754)
at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:136)
at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:279)
at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2760)
at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2110)
at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920)
at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.outerj.daisy.diff.helper.NekoHtmlParser.parse(NekoHtmlParser.java:68)
at org.outerj.daisy.diff.HtmlCleaner.cleanAndParse(HtmlCleaner.java:41)
at com.playsql.requirementyogi.reporting.diff.DiffEngine.getDiffHtml(DiffEngine.java:90)