Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7430

Encrypted pptx/xlsx causes a ClassNotFoundException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.1
    • None
    • None
    • Windows 7 (64bit) jre 1.8.0_40-b26 (64 bit)

    Description

      When indexing an encrypted pptx or xlsx file via the command

      solr-home>java -Dc=<core> -Dauto=yes -Ddata=files -jar example\exampledocs\post.jar file.pptx

      on a server started with

      solr-home>bin\solr start

      a ClassNotFoundException results instead of a EncryptedDocumentException.

      It appears that poi is using reflection to get the proper encryption handler, but the necessary jar files are not supplied by jetty's ClassLoader.

      A portion of the resulting error trace is below.

      org.apache.solr.common.SolrException: org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.microsoft.OfficeParser@2e973e0f

      at org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:227)

      ...

      Caused by: org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.microsoft.OfficeParser@2e973e0f

      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:262)

      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:256)

      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)

      at org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:221)

      ... 31 more

      Caused by: java.io.IOException: java.lang.ClassNotFoundException: org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder

      at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:69)

      at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:228)

      at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:172)

      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:256)

      ... 34 more

      Caused by: java.lang.ClassNotFoundException: org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder

      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)

      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)

      at org.apache.poi.poifs.crypt.EncryptionInfo.getBuilder(EncryptionInfo.java:150)

      at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:67)

      ... 37 more

      Attachments

        Activity

          People

            Unassigned Unassigned
            jon_s Jon Scharff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: