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

OSGi PortletURLGenerationListener registrations are shared with all portlet applications

    Details

      Description

      Background

      When an OSGi portlet is deployed, an instance of BundlePortletApp.java is created. The class has several private class-level (data member) variables, but many of the methods are wrappers/decorators that call through to the underlying PortletApp of the portal's portlet model.

      The problem is that PortletURLGenerationListener objects are stored in the underlying/decorated PortletApp of the portals portlet model, which makes them shared among all portlet applications in the system. The fix would be to not decorate the methods associated with PortletURLGenerationListeners.

      Steps to Reproduce

      1. Copy the attached com.liferay.lps84102.osgi.portlet-1.0.0.jar to $LIFERAY_HOME/deploy

      2. Add the "LPS_84102" portlet to a portal page

      3. Reload the page

      4. Delete the com.liferay.lps84102.osgi.portlet-1.0.0.jar from $LIFERAY_HOME/osgi/modules

      5. Reload the page

      Expected Results

      The following will appear in the browser:

      This portlet has been undeployed. Please redeploy it or remove it from the page.
      

      Actual Results

      The following error will appear in the browser:

      HTTP Status 500 – Internal Server Error
      
      Type Exception Report
      
      Message Unable to process template classic-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl
      
      Description The server encountered an unexpected condition that prevented it from fulfilling the request.
      
      Exception
      
      com.liferay.portal.kernel.template.TemplateException: Unable to process template classic-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl
      	com.liferay.portal.template.AbstractSingleResourceTemplate.processTemplate(AbstractSingleResourceTemplate.java:85)
      	com.liferay.taglib.util.ThemeUtil.doIncludeFTL(ThemeUtil.java:281)
      	com.liferay.taglib.util.ThemeUtil.doDispatch(ThemeUtil.java:159)
      	com.liferay.taglib.util.ThemeUtil.includeFTL(ThemeUtil.java:98)
      	com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:83)
      	com.liferay.taglib.theme.IncludeTag.doEndTag(IncludeTag.java:34)
      

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 10 weeks, 6 days ago

                Packages

                Version Package
                7.1.10 DXP FP1
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master