Step to reproduce:
- Create a EXT Plugin
- in the liferay-portlet-ext, add the following betweeing portlet-app tag to exclude the blog portlet:
- Deploy the EXT plugin and restart your container
Now browse to the portal home page will result in redirect loop.
I debug through the liferay source code and found that the FriendlyUrlServlet#service invokes the #getRedirect method and result in NPE.
The NPE is thrown from PortletImpl#getFriendlyURLMapperInstance because the portlet is no longer in the PortletBagPool but the PortletLocalServiceImpl#_friendlyURLMapperPortlets map still has a reference to the portlet instance.
The fix is probably to properly remove the portlet from the _friendlyURLMapperPortlets map when the core portlet is excluded in the PortletLocalServiceImpl#initEAR.
For those that needs to workaround this, simply set the <friendly-url-mapper-class></friendly-url-mapper-class> to null in the liferay-portlet-ext for the portlet to be excluded.