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

NPE occurs when upgrade com.liferay.fragment.service

    Details

      Description

      Step to reproduce:

      1. Start 7.1 portal
      2. Site Administration > Build > Page Fragments
      3. Add a new collection
      4. Add a fragment
      5. Insert the following codes in <div> tags of HTML section
             <lfr-editable id="title" type="text">Inline Content</lfr-editable>
        
      6. Publish
      7. Site Administration > Build > Pages > Display Pages tab
      8. Add a display page template
      9. Add the new fragment to display page template
      10. Click editable field > Map
      11. Select Web Content Article and Basic Web Content > Select Title
      12. Publish the display page template
      13. Click the ellipsis button of display page template
      14. Mark As Default
      15. Site Administration > Content > Web Content > Web Content tab
      16. Add a WC based on Basic Web Content
      17. Type WebContent as title
      18. Publish
      19. Access to http://localhost:8080/web/guest/-/webcontent
      20. Assert WebContent is shown in display page template
      21. Shutdown server
      22. Upgrade to master

      Expected Results:
      There shouldn't be error thrown during upgrade.

      Actual Results:
      The following errors are thrown during upgrade.

      2020-06-29 04:05:35.217 INFO  [main][UpgradeProcess:115] Failed upgrade process com.liferay.fragment.internal.upgrade.v1_1_0.UpgradePortletPreferences in 257 ms
      2020-06-29 04:05:35.235 ERROR [main][UpgradeStepRegistratorTracker:144] Failed upgrade process for module com.liferay.fragment.service
      com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:127)
      	at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:200)
      	at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:134)
      	at com.liferay.portal.upgrade.internal.executor.SwappedLogExecutor.execute(SwappedLogExecutor.java:51)
      	at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:155)
      	at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:118)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:137)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:86)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
      
      2020-06-29 04:05:58.612 INFO  [main][UpgradeProcess:115] Failed upgrade process com.liferay.fragment.internal.upgrade.v1_1_0.UpgradePortletPreferences in 124 ms
      2020-06-29 04:05:58.630 ERROR [main][ReleaseManagerOSGiCommands:93] bundle com.liferay.portal.upgrade.impl:4.0.9 (1228)[com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands(704)] : The activate method has thrown an exception
      com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:127)
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:200)
              at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:134)
              at com.liferay.portal.upgrade.internal.executor.SwappedLogExecutor.execute(SwappedLogExecutor.java:51)
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:155)
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:118)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.activate(ReleaseManagerOSGiCommands.java:276)
      

      Reproduced on:
      Upgrade From: 7.1.x-private GIT ID: c2f3fa7c9792fccae210b9cf7966277bd0b302cf.
      Tomcat 9.0.33 + MySQL 5.7. Portal master GIT ID: 0a9d8a4cef3087e830a086d8f30176c27981f37b.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              yang.cao Yang Cao
              Participants of an Issue:
              Recent user:
              Jason Pince
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                20 weeks, 6 days ago

                  Packages

                  Version Package
                  7.3.3 CE GA4
                  7.3.4 CE GA5
                  7.3.10 DXP GA1
                  Master