[ 
https://issues.apache.org/jira/browse/TIKA-4130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Allison resolved TIKA-4130.
-------------------------------
    Fix Version/s: 3.0.0-BETA
       Resolution: Fixed

We're removing xerces and xml-apis completely in Tika 3.x.

> Conflict with duplicate org/w3c and org/xml packages in tika-app jar
> --------------------------------------------------------------------
>
>                 Key: TIKA-4130
>                 URL: https://issues.apache.org/jira/browse/TIKA-4130
>             Project: Tika
>          Issue Type: Improvement
>    Affects Versions: 2.7.0, 2.9.0
>         Environment: Java 8 and Java 11
>            Reporter: RaahulUmapathy
>            Priority: Major
>             Fix For: 3.0.0-BETA
>
>
> While attempting to migrate from version 1.20 to version 2.7 of Apache Tika, 
> I encountered a specific error. 
> We have been using a "child-first classloader" to isolate the tika-app JAR 
> from the classpath for file parsing.
> {+}The error message we're facing is as follows{+}:
> java.lang.LinkageError: loader constraint violation: when resolving 
> overridden method 
> "org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument()Lorg/w3c/dom/Document;"
>  the class loader (instance of org/xeustechnologies/jcl/JarClassLoader) of 
> the current class, org/apache/xerces/jaxp/DocumentBuilderImpl, and its 
> superclass loader (instance of <bootloader>), have different Class objects 
> for the type org/w3c/dom/Document used in the signature.
> Upon analysis, I can see that a conflict exists between the default 
> classloader (rt.jar) and our child-first classloader due to different 
> versions of the class "Node.class" (org/w3c package) in both jars. Similar 
> issues were encountered with the classes in "org/xml" package too.
> {+}The parsing functionality worked correctly after removing the following 
> packages from the tika-app JAR{+}:
> 1. org/w3c/**
> 2. org/xml/**
> We are currently using Java 8 and would greatly appreciate guidance on the 
> same.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to