[ https://issues.apache.org/jira/browse/TIKA-4130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17771341#comment-17771341 ]
RaahulUmapathy commented on TIKA-4130: -------------------------------------- Hi Tim, Sorry for the delay in response The bundling of both *xerces* (org/xml package) and *DOM* (org/w3c package) seems to be the cause of the issue Initially, I validated this in Java 8 and 11 because we were planning to move our server's Java version from 8 to 11 Now I can confirm these mentioned packages are bundled in Java 17 and 21 If these packages are planned to be removed in Tika 3.x, may I know the tentative date for the release? If this might take some, can you please let me know if any patch can be given from your end ? Thanks in advance > 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 > Environment: Java 8 and Java 11 > Reporter: RaahulUmapathy > Priority: Major > > 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)