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

If a bundle of an LPKG is already deployed, the entire LPKG is rolled back

    Details

      Description

      To reproduce:
      1. Start up DXP SP1
      2. Deploy the LPKG of Audience Targeting 2.0.0 (from Marketplace)
      3. Observe error in the log:

      {{11:40:23,752 ERROR [Start Level: Equinox Container: 2036bf53-83ad-0016-162b-8a61ff5fde80][LPKGBundleTrackerCustomizer:160] Rollback bundle installation for [com.liferay.content.targeting.analytics.api_3.0.1 [513], com.liferay.content.targeting.analytics.processor_1.0.0 [514], com.liferay.content.targeting.analytics.service_2.0.0 [515], com.liferay.content.targeting.analytics.web_1.0.0 [516], com.liferay.content.targeting.anonymous.users.api_2.0.3 [517], com.liferay.content.targeting.anonymous.users.service_2.0.0 [518], com.liferay.content.targeting.api_4.0.1 [519], com.liferay.content.targeting.asset.entry.query.processor_1.0.0 [520], com.liferay.content.targeting.product.navigation.control.menu.dxp.theme.contributor_1.0.0 [521], com.liferay.content.targeting.display.web_2.0.0 [522], com.liferay.content.targeting.lang_1.0.0 [523], com.liferay.content.targeting.report.campaign.content.api_1.0.0 [524], com.liferay.content.targeting.report.campaign.content.service_2.0.0 [525], com.liferay.content.targeting.report.campaign.content.web_1.0.0 [526], com.liferay.content.targeting.report.campaign.tracking.action.api_1.2.0 [527], com.liferay.content.targeting.report.campaign.tracking.action.web_1.0.0 [528], com.liferay.content.targeting.report.campaign.tracking.action.service_2.0.0 [529], com.liferay.content.targeting.report.user.segment.content.api_1.1.0 [530], com.liferay.content.targeting.report.user.segment.content.service_2.0.0 [531], com.liferay.content.targeting.report.user.segment.content.web_1.0.0 [532], com.liferay.content.targeting.report.user.segment.users_1.0.0 [533], com.liferay.content.targeting.rule.age_1.0.0 [534], com.liferay.content.targeting.rule.browser_1.0.0 [535], com.liferay.content.targeting.rule.custom.field_1.0.0 [536], com.liferay.content.targeting.rule.device_1.0.0 [537], com.liferay.content.targeting.rule.facebook_1.0.0 [538], com.liferay.content.targeting.rule.gender_1.0.0 [539], com.liferay.content.targeting.rule.ip.geocode_1.0.0 [540], com.liferay.content.targeting.rule.ip.range_1.0.0 [541], com.liferay.content.targeting.rule.language_1.0.0 [542], com.liferay.content.targeting.rule.last.login.date_1.0.0 [543], com.liferay.content.targeting.rule.organization.member_1.0.0 [544], com.liferay.content.targeting.rule.os_1.0.0 [545], com.liferay.content.targeting.rule.previous.visited.site_1.0.0 [546], com.liferay.content.targeting.rule.role_1.0.0 [547], com.liferay.content.targeting.rule.score.points.api_1.0.1 [548], com.liferay.content.targeting.rule.score.points.service_2.0.0 [549], com.liferay.content.targeting.rule.score.points.web_1.0.0 [550], com.liferay.content.targeting.rule.sign.up.date_1.0.0 [551], com.liferay.content.targeting.rule.site.member_1.0.0 [552], com.liferay.content.targeting.rule.time_1.0.0 [553], com.liferay.content.targeting.rule.user.group.member_1.0.0 [554], com.liferay.content.targeting.rule.user.logged_1.0.0 [555], com.liferay.content.targeting.rule.visited_1.0.0 [556], com.liferay.content.targeting.service_3.0.0 [557], com.liferay.content.targeting.simulation.web_2.0.0 [558], com.liferay.content.targeting.tracking.action.content_1.0.0 [559], com.liferay.content.targeting.tracking.action.dynamic.data.lists.form.selector_1.0.0 [560], com.liferay.content.targeting.tracking.action.dynamic.data.lists.form.web_1.0.0 [561], com.liferay.content.targeting.tracking.action.form_1.0.0 [562], com.liferay.content.targeting.tracking.action.link_1.0.0 [563], com.liferay.content.targeting.tracking.action.page_1.0.0 [564], com.liferay.content.targeting.tracking.action.youtube_1.0.0 [565], com.liferay.content.targeting.web_2.0.0 [566], com.liferay.ip.geocoder_2.0.5 [369], com.liferay.ip.geocoder.sample.web_2.0.3 [567]]
      org.osgi.framework.BundleException: A bundle is already installed with the name "com.maxmind.geoip.api" and version "1.2.14"
      

      4. Log in and assert that Audience Targeting is not available on the Control Panel

      The problem is that LPKGBundleTrackerCustomizer rolls back the entire LPKG if any of it's bundles encounter any type of exception during install, and since the OSGi framework by default throws a BundleException when a bundle with the same name and version is installed already, this happens.

      When deploying the the module jars of the LPKG app separately, we avoid LPKGBundleTrackerCustomizer and the affected bundles are updated anyway, making the application installed successfully:

      14:18:33,983 WARN  [fileinstall-C:/liferay/bundles/liferay-dxp-digital-enterprise-7.0-sp1/osgi/modules][org_apache_felix_fileinstall:103] A bundle with the same symbolic name (com.maxmind.geoip.api) and version (1.2.14) is already installed.  Updating this bundle instead.
      

      This is what we need to do when deploying LPKGs also.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 38 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP SP2
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  Master