WARNING: org.xerial's sqlite-jdbc is not loaded

I am using Apache tika to check file extensions.

But I got this warning when initializing the TikaConfig object.

org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem WARNING: org.xerial's sqlite-jdbc is not loaded. Please provide the jar on your classpath to parse sqlite files. See tika-parsers/pom.xml for the correct version. 

To initial config

public static TikaConfig getTikaConfig() { TikaConfig tikaConfig = null; try { return new TikaConfig(); } catch (TikaException | IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return tikaConfig; } 

and use this object like following

public static final TikaConfig tikaConfig = getTikaConfig(); MediaType mediaType = tikaConfig.getDetector() .detect(TikaInputStream .get(item.getInputStream()), new Metadata()); MimeType mimeType = tikaConfig.getMimeRepository().forName(mediaType.toString()); String extension = mimeType.getExtension().split("\\.")[1]; 

My question is how to get rid of this warning.

PS: Gradle dependency for apache tika is

compile group: 'org.apache.tika', name: 'tika-core', version: '1.24.1' runtime group: 'org.apache.tika', name: 'tika-parsers' version: '1.24.1' 
4

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like