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

Unable to extract text NPE when re-indexing after upgrade on IBM SDK

    Description

    Steps to Reproduce:

    1. Download attached MySQL dump from 6.2.10.21 (Document Library is included, but has no effect on reproducing this issue)
    2. Import MySQL dump into MySQL server database
    3. Set JAVA_HOME to IBM SDK 8 Java
      • QA tested by copying Tomcat bundle to "ibmjava:8-sdk" docker image
    4. Execute upgrade to master when connected to the 6.2 database
    5. Start Tomcat bundle with IBM SDK 8 Java
    6. Login to portal after startup
    7. Go to Control Panel > Search > Index Actions
    8. Execute full Reindex

    Expected Result
    No errors on reindex

    Actual Result
    "Unable to extract text" warning occurs when re-indexing.

     WARN  [default-14][FileImpl:488] Unable to extract text from 24401
    org.apache.tika.exception.TikaException: Unexpected RuntimeException from [email protected]
            at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:293) ~[tika-core.jar:1.26]
            at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:143) ~[tika-core.jar:1.26]
            at com.liferay.portal.util.FileImpl._parseToString(FileImpl.java:1214) ~[portal-impl.jar:?]
            at com.liferay.portal.util.FileImpl.extractText(FileImpl.java:468) [portal-impl.jar:?]
            at com.liferay.portal.kernel.util.FileUtil.extractText(FileUtil.java:165) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.search.DocumentImpl.addFile(DocumentImpl.java:158) [portal-kernel.jar:?]
            at com.liferay.document.library.internal.search.spi.model.index.contributor.DLFileEntryModelDocumentContributor.contribute(DLFileEntryModelDocumentContributor.java:113) [bundleFile:?]
            at com.liferay.document.library.internal.search.spi.model.index.contributor.DLFileEntryModelDocumentContributor.contribute(DLFileEntryModelDocumentContributor.java:60) [bundleFile:?]
            at com.liferay.portal.search.internal.indexer.IndexerDocumentBuilderImpl.lambda$getDocument$1(IndexerDocumentBuilderImpl.java:60) [bundleFile:?]
            at com.liferay.portal.search.internal.indexer.IndexerDocumentBuilderImpl$$Lambda$10456/00000000706D83E0.accept(Unknown Source) [bundleFile:?]
            at java.lang.Iterable.forEach(Iterable.java:86) [?:2.9 (07-24-2020)]
            at com.liferay.portal.search.internal.indexer.IndexerDocumentBuilderImpl.getDocument(IndexerDocumentBuilderImpl.java:58) [bundleFile:?]
            at com.liferay.portal.search.internal.index.contributor.helper.ModelIndexerWriterDocumentHelperImpl.getDocument(ModelIndexerWriterDocumentHelperImpl.java:41) [bundleFile:?]
            at com.liferay.document.library.internal.search.spi.model.index.contributor.DLFileEntryModelIndexerWriterContributor.lambda$customize$0(DLFileEntryModelIndexerWriterContributor.java:56) [bundleFile:?]
            at com.liferay.document.library.internal.search.spi.model.index.contributor.DLFileEntryModelIndexerWriterContributor$$Lambda$14545/0000000028372F10.accept(Unknown Source) [bundleFile:?]
            at com.liferay.portal.search.internal.batch.DynamicQueryBatchIndexingActionableAdapter.lambda$setPerformActionMethod$0(DynamicQueryBatchIndexingActionableAdapter.java:75) [bundleFile:?]
            at com.liferay.portal.search.internal.batch.DynamicQueryBatchIndexingActionableAdapter$$Lambda$14547/0000000028066D50.performAction(Unknown Source) [bundleFile:?]
            at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performAction(DefaultActionableDynamicQuery.java:394) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:306) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:268) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:326) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery.doPerformActions(IndexableActionableDynamicQuery.java:107) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86) [portal-kernel.jar:?]
            at com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery.performActions(IndexableActionableDynamicQuery.java:65) [portal-kernel.jar:?]
            at com.liferay.portal.search.internal.batch.DynamicQueryBatchIndexingActionableAdapter.performActions(DynamicQueryBatchIndexingActionableAdapter.java:50) [bundleFile:?]
            at com.liferay.portal.search.internal.indexer.IndexerWriterImpl.reindex(IndexerWriterImpl.java:199) [bundleFile:?]
            at com.liferay.portal.search.internal.indexer.DefaultIndexer.reindex(DefaultIndexer.java:267) [bundleFile:?]
            at com.liferay.portal.search.internal.SearchEngineInitializer.reindex(SearchEngineInitializer.java:192) [bundleFile:?]
            at com.liferay.portal.search.internal.SearchEngineInitializer$1.call(SearchEngineInitializer.java:145) [bundleFile:?]
            at com.liferay.portal.search.internal.SearchEngineInitializer$1.call(SearchEngineInitializer.java:136) [bundleFile:?]
            at java.util.concurrent.FutureTask.run(FutureTask.java:277) [?:1.8.0]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522) [?:1.8.0]
            at java.util.concurrent.FutureTask.run(FutureTask.java:277) [?:1.8.0]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) [?:1.8.0]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:1.8.0]
            at java.lang.Thread.run(Thread.java:822) [?:2.9 (07-24-2020)]
    Caused by: java.lang.NullPointerException
            at org.apache.tika.sax.TaggedContentHandler.throwIfCauseOf(TaggedContentHandler.java:100) ~[tika-core.jar:1.26]
            at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:289) ~[tika-core.jar:1.26]
            at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) ~[tika-core.jar:1.26]
            ... 35 more

    Reproduced on:
    Master + Tomcat 9 + IBM SDK 8 + MySQL 5.7
    Master + Websphere 9 + IBM SDK 8 + MySQL 5.7

    Not reproducible on:
    Master + Tomcat 9 + Oracle OpenJDK 8 + MySQL 5.7
    7.3.x + Websphere 9 + IBM SDK 8 + MySQL 5.7

      Attachments

        Activity

          People

          Assignee:
          support-lep@liferay.com SE Support
          Reporter:
          kyle.miho Kyle Miho
          Participants of an Issue:
          Recent user:
          Sophia Zhang
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Dates

            Created:
            Updated:
            Days since last comment:
            22 weeks ago

              Packages

              Version Package