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

Custom Spring MVC -portlets broken after upgrading to Liferay 6.1 GA2 (web.xml listener order)

    Details

      Description

      We have the structure where applicationContext.xml contains shared beans (service layer, dao layer and such) and is loaded by org.springframework.web.context.ContextLoaderListener . Additionally all portlets have their own context loading MVC related beans (controllers, view resolvers, etc).

      Generated listeners in web.xml on version 6.1 GA1:

      <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <listener>
      <listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
      </listener>
      <listener>
      <listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
      </listener>

      After upgrading to Liferay 6.1 GA2 deployment sorts listeners in web.xml alphabetically:

      <listener>
      <listener-class>com.liferay.portal.kernel.servlet.PluginContextListener</listener-class>
      </listener>
      <listener>
      <listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
      </listener>
      <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>

      This causes portlet context to be loaded first and dependent beans from application context are missing.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tammy.fong Tammy Fong (Inactive)
              Reporter:
              tommi@hannikkala.com Tommi Hännikkälä
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              4 Vote for this issue
              Watchers:
              21 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 37 weeks, 1 day ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.2 CE GA3
                  6.1.30 EE GA3
                  6.2.0 CE M2