Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-30869

TikaMetaDataProcessor throws Exception when tries to index encrypted document

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: 6.1.30 EE GA3, 6.2.0 CE M2
    • Component/s: DM
    • Labels:

      Description

      If a user uploads an encrypted document and tries to edit it, the following stack trace will show up in the log:

      14:41:02,517 INFO  [STDOUT] 14:41:02,516 ERROR [TikaRawMetadataProcessor:103] Unable to parse
      org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.OfficeParser@4e481c13
              at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:199)
              at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:197)
              at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135)
              at com.liferay.portal.metadata.TikaRawMetadataProcessor.extractMetadata(TikaRawMetadataProcessor.java:100)
              at com.liferay.portal.metadata.TikaRawMetadataProcessor.extractMetadata(TikaRawMetadataProcessor.java:54)
              at com.liferay.portal.metadata.BaseRawMetadataProcessor.getRawMetadataMap(BaseRawMetadataProcessor.java:62)
              at com.liferay.portal.kernel.metadata.RawMetadataProcessorUtil.getRawMetadataMap(RawMetadataProcessorUtil.java:41)
              at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:117)
              at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:89)
              at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:36)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
              at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:103)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:669)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:580)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: org.apache.poi.EncryptedDocumentException: Cannot process encrypted word files!
              at org.apache.poi.hwpf.HWPFDocumentCore.<init>(HWPFDocumentCore.java:148)
              at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:147)
              at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:131)
              at org.apache.tika.parser.microsoft.WordExtractor.parse(WordExtractor.java:61)
              at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:182)
              at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:197)
              ... 15 more
      

      Expected behavior: not an exception but an error message should be logged.

      Similar problem occurs when the encrypted document is uploaded and later moved to another folder or the Recycle Bin.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 49 weeks, 4 days ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M2