NoClassDefFoundError: org/apache/commons/compress/archivers/ArchiveException
Hi everyone,
I have a project in AEM 6.0 (SP2) where we want to extract content from files used on a page for a Solr search index with the help of the Apache Tika library. Now I'm getting (it seems random but rather often) the following exception:
24.09.2015 16:08:03.807 *ERROR* [172.31.19.108 [1443103681822] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.impl.servlets.CommandServlet Error during replication: org/apache/commons/compress/archivers/ArchiveException java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/ArchiveException at org.apache.tika.parser.pkg.ZipContainerDetector.detectArchiveFormat(ZipContainerDetector.java:112) at org.apache.tika.parser.pkg.ZipContainerDetector.detect(ZipContainerDetector.java:77) at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:61) at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:61) at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:113) at at.spar.portal.intranet.core.solr.utils.SolrContentUtils.getPlainTextFromFolioDocument(SolrContentUtils.java:307) at at.spar.portal.intranet.core.solr.utils.SolrContentUtils.updateOrIndexSolrFolioDocument(SolrContentUtils.java:247) ...
I don't quite understand why I get this error, since it worked before and nothing really changed there. Also I found the "missing" class with the OSGi dependency finder (http://localhost:4502/system/console/depfinder searching for org.apache.commons.compress.archivers.ArchiveException). I even downloaded the commons-compress-1.4.1-withoutxz.jar file and looked inside for the "ArchiveException.class".
I also added the maven dependency for the "commons-compress" lib (also tried a higher version like 1.10) and tried embedding the lib into my project's bundle. Still I get the NoClassDefFoundError.
Any ideas what might cause the issue?