Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27615

Fix nuxeo-diff content comparison broken since 10.10

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF09, 11.1, 2021.0
    • Component/s: Diff
    • Release Notes Summary:
      The nuxeo-diff addon is compatible with JSF UI in 10.10
    • Sprint:
      nxplatform 11.1.12, nxplatform 11.1.13
    • Story Points:
      2

      Description

      Failing with

      2019-06-20T10:54:06,504 ERROR [DefaultNuxeoExceptionHandler] javax.servlet.ServletException: On requestURL: http://localhost:8080/nuxeo/restAPI/contentDiff/default/6d9d6527-2777-4caf-87b5-60e4e7c356b1/5e7362cd-3e4e-4d4c-8e9a-8fb7814fb0b5/file:content/
      	at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:151)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:139)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:633)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:429)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsCsrfFilter.doFilter(NuxeoCorsCsrfFilter.java:251)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:69)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:64)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      	at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:290)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1839)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: javax.servlet.ServletException: L'exécution de la servlet a lancé une exception
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:238)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoStandbyFilter.doFilter(NuxeoStandbyFilter.java:67)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:131)
      	... 36 more
      Caused by: java.lang.NoClassDefFoundError: org/cyberneko/html/parsers/SAXParser
      	at org.outerj.daisy.diff.helper.NekoHtmlParser.parse(NekoHtmlParser.java:46)
      	at org.outerj.daisy.diff.HtmlCleaner.cleanAndParse(HtmlCleaner.java:41)
      	at org.nuxeo.ecm.diff.content.adapter.HtmlContentDiffer.getContentDiff(HtmlContentDiffer.java:127)
      	at org.nuxeo.ecm.diff.content.adapter.base.ConverterBasedContentDiffAdapter.getContentDiffBlobs(ConverterBasedContentDiffAdapter.java:139)
      	at org.nuxeo.ecm.diff.content.adapter.base.AbstractContentDiffAdapter.getFileContentDiffBlobs(AbstractContentDiffAdapter.java:63)
      	at org.nuxeo.ecm.diff.content.restlet.ContentDiffRestlet.initCachedContentDiffBlobs(ContentDiffRestlet.java:192)
      	at org.nuxeo.ecm.diff.content.restlet.ContentDiffRestlet.handle(ContentDiffRestlet.java:129)
      	at org.nuxeo.ecm.platform.ui.web.restAPI.ThreadSafeRestletFilter.doHandle(ThreadSafeRestletFilter.java:48)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Filter.doHandle(Filter.java:150)
      	at org.restlet.routing.Filter.handle(Filter.java:197)
      	at org.restlet.routing.Router.doHandle(Router.java:422)
      	at org.restlet.routing.Router.handle(Router.java:641)
      	at org.restlet.ext.servlet.ServletAdapter.service(ServletAdapter.java:195)
      	at org.nuxeo.ecm.platform.ui.web.restAPI.RestletServlet.service(RestletServlet.java:115)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	... 50 more
      Caused by: java.lang.ClassNotFoundException: org.cyberneko.html.parsers.SAXParser
      	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363)
      	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
      	... 67 more
      

      Since NXP-26020 "Replace AntiSamy with Java HTML Sanitizer", this dependency has been removed

      org.owasp.antisamy:antisamy
      

      see commit.

      Yet, it was pulling

      net.sourceforge.nekohtml:nekohtml
      

      Thus, this lib is no more embedded in the nuxeo-nxr-server since 10.10.

      Because of NXP-12413 that was excluding org.cyberneko:html from org.outerj.daisy:daisydiff (to rely on the provided nekohtml ), this lib is not included in the nuxeo-diff marketplace package.

      Let's remove the org.cyberneko:html exclusion from nuxeo's root pom to let the nuxeo-diff package pull it as a transitive dependency of org.outerj.daisy:daisydiff:1.2-NX2:jar:shaded.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours
                  6h