tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2693) Tika 1.17 uses the wrong classloader for reflection
Date Thu, 09 Aug 2018 11:21:00 GMT

    [ https://issues.apache.org/jira/browse/TIKA-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574706#comment-16574706

Karl Wright commented on TIKA-2693:

Re: testing: I don't have a test setup here, and the user is not at liberty to send documents
to me that cause the problem.   He says he's been in contact with someone on the Tika team
and has replaced all four Tika jars with ones from nightly, and I think he replaced the POI
jars with 4.0.0 ones earlier, but don't know if he retained that change, since that's not
supposed to work 100%.  Anyway, if he responds to my inquiry I will request he build new jars
from the branch that Tim created and see if they all work.

> Tika 1.17 uses the wrong classloader for reflection
> ---------------------------------------------------
>                 Key: TIKA-2693
>                 URL: https://issues.apache.org/jira/browse/TIKA-2693
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.17
>            Reporter: Karl Wright
>            Priority: Major
> I don't know whether this was addressed in 1.18, but Tika seemingly uses the wrong classloader
when loading some classes by reflection.
> In ManifoldCF, there's a two-tiered classloader hierarchy.  Tika runs in the higher class
level.  Its expectation is that classes that are loaded via reflection use the classloader
associated with the class that is resolving the reflection, NOT the thread classloader.  That's
standard Java practice.
> But apparently there's a place where Tika doesn't do it that way:
> {code}
> Error tossed: org/apache/poi/POIXMLTextExtractor
> java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTextExtractor
>         at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:106)
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) ~[?:?]
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) ~[?:?]
>         at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143) ~[?:?]
>         at org.apache.manifoldcf.agents.transformation.tika.TikaParser.parse(TikaParser.java:74)
> {code}

This message was sent by Atlassian JIRA

View raw message