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

LPKG hot deployment may run into unresolved dependencies due to incorrect module installation order

    Details

      Description

      Steps to reproduce:

      1. Within Portal source, add a ".lfrbuild-portal" trigger file to all of the modules within the portal-search-elasticsearch7 app
      2. Build the portal-search-elasticsearch7 modules using gradle deploy
      3. Generate the LPKGs using the "ant build-app-lpkg" command within the modules directory (there should be 3 LPKGs: API, Impl, SPI)
      4. Add property restart-required=false within each LPKG's liferay-marketplace.properties file
      5. Combine the 3 LPKGs into a single "container" LPKG (zip up the 3 LPKGs into one file and change the extension of that file to .lpkg)
      6. Place the single LPKG within the Portal bundle's deploy folder
      7. Start Portal

      Actual result: The impl module fails to start due to unresolved requirement errors:

      2019-12-17 19:49:28.678 ERROR [fileinstall-/home/joshchong/liferay/bundles/master-stable-hotdeploy/osgi/marketplace][LPKGBundleTrackerCustomizer:350] Rollback bundle installation for [com.liferay.portal.search.elasticsearch7.impl_2.0.0 [1031]]
      org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.search.elasticsearch7.impl [1031]
        Unresolved requirement: Import-Package: com.liferay.portal.search.elasticsearch7.spi.index; version="[1.0.0,2.0.0)"
      

      Note: This does not happen when deploying the individual jars within the deploy folder. This also does not happen when deploying the LPKGs within the osgi/marketplace directory. When hot deploying LPKGs, the current framework can only see the installation of each module one at a time so in the above example, elasticsearch7.impl isn't able to resolve correctly since elasticsearch7.spi wasn't installed yet.

      Workaround: Restart Portal OR before hot deploying, extract and package the elasticsearch7.spi jar within the API.lpkg.

      Reproduced on:
      Portal master git commit: 634eeea1c7756f15060d98510e53474920fc43d1
      Portal 7.2.x git commit: 01bf21c5f36cd11f71e9805c64faf46376057fc4

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joshua.chong Joshua Chong
              Reporter:
              joshua.chong Joshua Chong
              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, 40 weeks ago

                  Packages

                  Version Package
                  7.1.X
                  7.2.10 DXP FP4
                  7.2.X
                  7.3.0 CE GA1
                  7.3.1 CE GA2
                  7.3.10 DXP GA1
                  Master