Affects Version/s: 7.1.0 CE GA1, 7.1.1 CE GA2, 7.1.2 CE GA3, 7.1.3 CE GA4, 7.2.0 GA1, 7.2.1 CE GA2, 7.3.0 CE GA1, 7.3.1 CE GA2, 7.3.2 CE GA3, 7.3.3 CE GA4, 7.3.4 CE GA5, 7.3.5 CE GA6, 7.3.6 CE GA7, 7.3.7 CE GA8, 7.4.0 CE GA1, 7.4.1 CE GA2, 7.4.2 CE GA3
JSF portlet developers now have the ability for JSF portlets to take advantage of OSGi+CDI integration via the OOTB weld-osgi-bundle.jar module.
However, until JSR 378 is released, JSF portlet developers must use Liferay Faces Bridge 4.x (Portlet 2.0 + JSF 2.2). This means that the portlet.xml descriptor would be set to version="2.0". The problem is that CDIBeanPortletExtension._invokeBeanPortletMethod(...) assumes Portlet 3.0 and when it calls ActionRequest.getActionParameters(). Because of this, when a Portlet 2.0 portlet tries to register as a bean portlet, an UnsupportedOperationException is thrown by ActionRequestImpl.getActionParameters().
In order to accommodate registration of Portlet 2.0 portlets as bean portlets, CDIBeanPortletExtension should alternatively call ActionRequest.getParameter(String) instead.
In order to workaround this issue, demo portlets like the jsf-cdi-applicant-portlet specify version="3.0" in portlet.xml. However, this is not a good workaround since Liferay Faces Bridge 4.x is designed to be used in a Portlet 2.0 container at runtime.
1. Deploy the attached com.liferay.test.lps138499.portlet.war artifact to $LIFERAY_HOME/deploy
2. Monitor the console log and make sure it reports the following regarding registration of a bean portlet:
3. Create a Widget Page named "
4. Add the "com.liferay.test.lps138499.portlet" to the widget page
5. Click on the "Submit" button
The portlet redisplays without any changes, and the following appears in the console log:
The following stacktrace will appear in the console log: