Uploaded image for project: 'Magnolia Diff Module'
  1. Magnolia Diff Module
  2. MGNLDIFF-81

VersionDiffHtmlGenerator throws warning when creating diff

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • 1.6
    • None

    Description

      How to reproduce

      1. Open pages app and publish a page
      2. Open the pulse
      3. Open the publication request
      4. Click show changes

      Alternative 1

      1. Directly use action "Compare with previous version" or "Compare with version"

      Alternative 2

      1. Build the module
      2. See same errors when tests for VersionDiffHtmlGenerator are executed

      The following appears in the log:

      Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      

      Different log warnings with different java version

      java version "1.8.0_11"
      Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
      

      and

      java version "1.7.0_67"
      Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
      

      produce

      Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      Compiler warnings:
        WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
      

      whereas

      java version "1.6.0_65"
      Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
      Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
      

      only produces

      Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      

      Related links

      Potential solution

      See: https://bugs.openjdk.java.net/browse/JDK-8028111

      Create a custom XMLSecurityManager which would in turn mean to fully customize daisydiff.

      XMLInputFactory factory = XMLInputFactory.newInstance();
      XMLSecurityManager securityManager = new XMLSecurityManager(false);
      factory.setProperty("http://apache.org/xml/properties/security-manager", securityManager); 
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              rgange Richard Gange
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD