Hi Nick

I'm asking Tika to parse a JAR file but Tika is throwing a
NoClassDefFoundError exception (see the full call stack from my original
email).  Why I'm asking Tika to parse a JAR file?  I have no control over
file types I will pass it and per
https://tika.apache.org/1.11/formats.html#Java_class_files_and_archives JAR
format type is supported.  But in my case, it looks like the issue is a
missing parser JAR

As of now:

1) I want Tika to tell me what are the file types it supports (I got the
answer for htat)
2) I want Tika to tell me it cannot parse a file due to missing parser JAR
(I don't know how to do this)

For #2, all that I'm getting now is a NoClassDefFoundError.  This is not
good.  Is there a none exception way of asking Tika to tell me if it can
parse a file or not?

Thanks

Steve

On Fri, Feb 5, 2016 at 6:17 PM, Nick Burch <[email protected]> wrote:

> On Fri, 5 Feb 2016, Steven White wrote:
>
>> For the missing JAR part
>>>>
>>> Set your Load Error Handler to Warn or Error to find out about parsers
>>> with missing classes or dependencies
>>>
>>
>> This won't do.  What's happening now is if I give Tika a JAR file to
>> parse, it is throwing NoClassDefFoundError exception (see my original
>> posting).
>>
>
> Hang on - are you asking Tika to parse a Jar, or are you asking Tika to
> use a parser in your jar?
>
> Is there a way for me to know that Tika doesn't have the parser for this
>> type and thus I will not bother to parse it?
>>
>
> If Tika knows that a parser isn't available, it won't use it. If you ask
> Tika what active parsers it has, it won't include it
>
> Nick
>

Reply via email to