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

com.liferay.portal.util.FileImpl is swallowing relevant Tika errors which prevents further debugging

    Details

      Description

      Description:
      1. Update method "extractText" in class "com.liferay.portal.util.FileImpl" to log underlying Tika exception.
      From
      else if (e instanceof TikaException) {
      if (_log.isWarnEnabled())

      { _log.warn("Unable to extract text from " + fileName); }

      to
      else if (e instanceof TikaException) {
      if (_log.isWarnEnabled())

      { _log.warn("Unable to extract text from " + fileName + " : " + e.getMessage(), e); }

      This will allow the actual error to be reported rather than giving a vague answer that the metadata was unable to be extracted.
      Steps to reproduce:
      1. Upload a corrupted file, encrypted, or problematic file to Documents and Media (I have attached a problematic file )
      2. Notice the error
      Expected Result:
      Error should detail the actual underlying error from Tika.

        Attachments

        1. FIX.txt
          24 kB
        2. REPRODUCED.txt
          5 kB

          Issue Links

            Activity

              People

              • Assignee:
                michael.yu Michael Yu (Inactive)
                Reporter:
                dale.shan Dale Shan (Inactive)
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 11 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP5
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  7.1.X
                  Master