Affects Version/s: Master
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.
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
The following will appear in the browser:
The following error will appear in the browser: