[
https://issues.apache.org/jira/browse/ANY23-406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hans Brende resolved ANY23-406.
-------------------------------
Resolution: Fixed
Assignee: Hans Brende
Fix Version/s: 2.3
> Cannot suppress Tika warnings
> -----------------------------
>
> Key: ANY23-406
> URL: https://issues.apache.org/jira/browse/ANY23-406
> Project: Apache Any23
> Issue Type: Bug
> Components: core
> Affects Versions: 2.2
> Environment: Eclipse/Macbook Pro/Java 8 ....
> Reporter: David Cockbill
> Assignee: Hans Brende
> Priority: Major
> Fix For: 2.3
>
>
> I am writing a Java application; and have pulled in Any23 2.2 from Maven
> Central. I am having issues with the suppression of the following Tika
> warnings:
>
> {code:java}
> org.apache.tika.config.InitializableProblemHandler$3
> handleInitializableProblem
> WARNING: JBIG2ImageReader not loaded. jbig2 files will be ignored
> See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
> for optional dependencies.
> TIFFImageWriter not loaded. tiff files will not be processed
> See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
> for optional dependencies.
> J2KImageReader not loaded. JPEG2000 files will not be processed.
> See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
> for optional dependencies.
> {code}
> Now, I understand I can just pull in these dependancies; but that then
> introduces licensing issues.
>
> I have also searched around the for other solutions. I have seen many issue
> reports that claim the fix is to quash the warnings using a tika-config.xml
> file. The suggested fixes are slightly ambiguous to me.
> I was unsure whether to use 'tiki.confg' or 'tika.config.file' for the System
> Property for the config file. I was also unsure whether to set either of the
> following:
> * <service-loader initializableProblemHandler="ignore"/>
> * <service-loader loadErrorHandler="ignore"/>
> Regardless, I have tried all combinations to no avail. When constructing an
> Any23 instance, I still get the warnings.
> I then had a quick look through the code and the Any23 class has a Mime Type
> Detector:
>
> {code:java}
> private MIMETypeDetector mimeTypeDetector = new TikaMIMETypeDetector( new
> WhiteSpacesPurifier() );
> {code}
>
> This in turn constructs a TikaConfig from the following resource:
>
> {code:java}
> public static final String RESOURCE_NAME =
> "/org/apache/any23/mime/tika-config.xml";
> {code}
>
> This configuration file certainly does not include the aforementioned methods
> of suppressing the warnings; and as far as I can determine will override any
> configuration file that I could inject.
> From stepping through the code the warnings appear whilst constructing
> TikaMIMETypeDetector.
> So, am I missing something; or is there no way to suppress these warnings?
> When looking for solutions to this I have seen the same warnings in the
> traces for other bugs. I assume these authors are maybe not worried about
> these?
> Thanks for any advice, and I apologise if I have not selected the correct
> components etc. for the issue.
>
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)