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

Site Initializer should work even if commerce is not deployed

Description

    Description
    If the Commerce module is undeployed (for instance, by setting the portal property "enterprise.product.commerce.enabled=false"), then the Site Initializer Extender module fails to load. This is because the Site Initializer Extender module has a required dependency on the Commerce module. We should rewrite this code so that this dependency is optional instead, since some users may not want to deploy Commerce.

    Steps to Reproduce
    1. Add the following line to your portal-ext.properties file:

    enterprise.product.commerce.enabled=false
    

    2. Start up the portal.
    Expected Result: The portal would start up successfully with no errors.
    Actual Result: The following error occurs when starting up the portal, leading to the Site Initializer Extender module failing to start properly:

    2022-03-01 16:38:23.548 ERROR [Framework Event Dispatcher: Equinox Container: ac0d40f2-0748-47dc-8082-e92f1fb1ebf1][Framework:93] FrameworkEvent ERROR
    com.liferay.portal.kernel.log.LogSanitizerException: org.osgi.framework.BundleException: Could not resolve module: com.liferay.site.initializer.extender [989]_  Unresolved requirement: Import-Package: com.liferay.commerce.account.util; version="1.3.0"_ [Sanitized]
            at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1662) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi.jar:?]
            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [org.eclipse.osgi.jar:?]
    

    Attachments

      Issue Links

        Activity

          People

            jose.abelenda Jose Abelenda
            brian.chan Brian Chan
            Kiyoshi Lee Kiyoshi Lee
            Michael Bowerman Michael Bowerman
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 weeks, 1 day ago

              Packages

                Version Package
                7.4.3.15 CE GA15
                7.4.3.16 CE GA16
                7.4.3.36 CE GA36
                7.4.3.37 CE GA37
                Master