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

Portlets with periods in name do not work with service builder, resulting in BeanLocatorException when the portal attempts to reference them

    Details

      Description

      Description:
      If a portlet has periods in its filename, the BeanLocator for the servlet context strips the periods out of the name when registering it in Tomcat. However, service builder generates the ClpSerializer file that returns the context name, informing the portal to search for the name with periods which results in a BeanLocatorException when the portal attempts to reference the portlet.

      Steps to Reproduce:
      1. Download the portlet in https://issues.liferay.com/browse/LPP-23153 (There are two versions with the same name, please download the latest one as it is modified to work with master))
      2. Deploy the provided test portlet with periods in name.
      3. Attempt to add the portlet to a page.

      Expected:
      Portlet is added to the page and becomes available.
      Actual:
      Portlet is added to the page but immediately becomes unavailable and BeanLocatorException is thrown in logs:

      16:11:06,549 ERROR [http-nio-8080-exec-6][PortletBeanLocatorUtil:42] BeanLocator is null for servlet context portlet.example.name
      16:11:06,550 ERROR [http-nio-8080-exec-6][PortletBeanLocatorUtil:42] BeanLocator is null for servlet context portlet.example.name
      16:11:06,557 ERROR [http-nio-8080-exec-6][render_portlet_jsp:131] null
      com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator is not set for servlet context portlet.example.name
              at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:46)
      

      Additional Testing:
      7.0.x: c4c1c72b762e6236b6d13abb6844ad65320ef169
      Issue reproduced in branch.

      Master: d83b38e3280987eec978fe18e42f5d7b493d6e57
      With the modified portlet, the issue is also reproduced

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sylvia.luan Sylvia Luan
              Reporter:
              nolan.chan Nolan Chan
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 7 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP10
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  7.1.X
                  Master