[MAGNOLIA-5983] Replace outdated xerces 2.8.1 Created: 12/Nov/14  Updated: 20/Jul/18  Resolved: 19/Jun/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 5.7

Type: Improvement Priority: Neutral
Reporter: Daniel Lipp Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates BUILD-311 Remove use of Xerces and replace it w... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Epic Link: 5.7 library update
Sprint: Saigon 148
Story Points: 2

 Description   

Since java 1.5 the jdk itself contains a SAXParser, OutputFormat, XMLSerializer and so on so actually we could simply use those and completely remove the isolated xerces from our bundles.

(We're currently using xerces 2.8.1 from 2006 - latest version would have been 2.11.0 from 2010 but that one internally uses xml-apis that are banned from our poms because that's know to cause many problems).



 Comments   
Comment by Daniel Lipp [ 12/Nov/14 ]

Looks like newer versions of xerces (e.g. 2.11.0) required xml-apis (banned from our poms) to be in the class path: https://netbeans.org/bugzilla/show_bug.cgi?id=235090

      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.11.0</version>
      </dependency>
      <!-- xerces require this version of xml-apis -->
      <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>1.4.01</version>
      </dependency>

Else we'll e.g. getjava.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

Unfortunately xml-apis are known to cause a lot of problems (that's why they're banned form our pom's). Hence we decided to not do that upgrade for 5.4.

Comment by Daniel Lipp [ 14/Nov/14 ]

In our code we could switch to using the replacements for Xerces that are build into the jdk (since 1.5). See com.sun.org.apache.xerces.internal or com.sun.org.apache.xml.internal.serialize packages. Right now we could still not drop xerces as e.g. other third-party libs like betwixt 0.8 use it at runtime.

Comment by Dai Ha [ 20/Jun/18 ]

QA done, tried with export and import function on 5.7.

Generated at Mon Feb 12 04:10:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.