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

Unable to save metadata during the upgrade copying journalArticleImages to DL

    Description

    This is an intermittent issue probably due a race condition. These are the steps to try to reproduce it:

    1. Startup Liferay 6.2
    2. Create a WCM Structure with an image field
    3. Create a WCM Template for it
    4. Create one or several web contents using that structure and uploading an image.
    5. Upgrade to master/7.2 or 7.1

    Results:
    From time to time you will get:

    2019-06-05 22:09:24.143 WARN [liferay/document_library_raw_metadata_processor-1][RawMetadataProcessorMessageListener:38] Unable to save metadata for file version 2097347
    java.lang.NullPointerException
    at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:188)
    at com.liferay.document.library.kernel.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:113)
    at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:34)
    at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
    at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
    at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:58)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
    at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
    at java.lang.Thread.run(Thread.java:748)
    

    At that point of the code:
    https://github.com/liferay/liferay-portal/blob/7.1.x/portal-impl/src/com/liferay/portlet/documentlibrary/util/RawMetadataProcessorImpl.java#L188

    it seems that either liferayFileEntry or the indexer are null.

    Expected results:
    No traces.

    It's important to recall that this issue is happening trying to index so it is not problematic for the upgrade. The changes in the metadata are committed anyway.

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            beck.liu Beck Liu
            Reporter:
            alberto.chaparro Alberto Chaparro
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 35 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP17
                7.1.10.4 SP4
                7.1.X
                7.2.10 DXP FP1
                7.2.X
                7.2.1 CE GA2
                7.3.10 DXP GA1
                Master