Categories
Mastering Development

While I am trying to detect .xls and .ppt files using Apache Tika, i am getting an error java.lang.NoSuchFieldError : SMALLER_BIG_BLOCK_SIZE_DETAILS

Tika tika = new Tika(); TikaInputStream inputStream; String tikaType=””; inputStream = TikaInputStream.get(fileInputStream); try { tikaType = tika.detect(inputStream); } catch (IOException e) { e.printStackTrace(); } System.out.println(“TikaStream Find : ” +tikaType); System.out.println(“File Extension : ” +fileExtension); Stack Trace :- java.lang.NoSuchFieldError: SMALLER_BIG_BLOCK_SIZE_DETAILS org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:93) org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:211) org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:167) org.apache.tika.parser.microsoft.POIFSContainerDetector.getTopLevelNames(POIFSContainerDetector.java:388 ) org.apache.tika.parser.microsoft.POIFSContainerDetector.detect(POIFSContainerDetector.java:451) org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:84) org.apache.tika.Tika.detect(Tika.java:156) org.apache.tika.Tika.detect(Tika.java:203