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

Multiple instances of same servlet event listeners can be registered when specified via TLD

    Details

      Description

      Steps to reproduce:

      1. Download the attached portlet, unzip it, and build it:
        unzip ~/Download/jsp-war-portlet.zip && cd jsp-war-portlet && mvn clean package
        
      2. Deploy the WAR to Liferay Portal:
         cp target/*.war $LIFERAY_HOME/deploy/.
        

      If the bug still exists, you'll see two instances of contextInitialized() in the logs indicating that two instances of TestContextListener were created:

      2018-09-20 16:09:54.064 FATAL [fileinstall-/home/kylestiemann/Portals/liferay.com/liferay-dxp-digital-enterprise-7.0-sp7/osgi/war][TestContextListener:33] __!!!! com.liferay.blade.samples.portlet.TestContextListener@3c0fdca1 contextInitialized()__ [Sanitized]
      2018-09-20 16:09:54.077 FATAL [fileinstall-/home/kylestiemann/Portals/liferay.com/liferay-dxp-digital-enterprise-7.0-sp7/osgi/war][TestContextListener:33] __!!!! com.liferay.blade.samples.portlet.TestContextListener@37638d2c contextInitialized()__ [Sanitized]
      

      If the bug is fixed, only one instance of contextInitialized() will appear in the logs:

      2018-09-20 16:09:54.077 FATAL [fileinstall-/home/kylestiemann/Portals/liferay.com/liferay-dxp-digital-enterprise-7.0-sp7/osgi/war][TestContextListener:33] __!!!! com.liferay.blade.samples.portlet.TestContextListener@37638d2c contextInitialized()__ [Sanitized]
      

      This problem does not occur in Liferay 6.2.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  45 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP59
                  7.0.0 DXP SP9
                  7.0.X
                  7.1.10 DXP FP3
                  7.1.1 CE GA2
                  7.1.10.1 SP1
                  7.1.X
                  Master