Issue
- Many
processAction method not implementederrors are thrown in the server log:
ERROR [http-nio-8080-exec-1][PortletServlet:117] null
javax.portlet.PortletException: javax.portlet.PortletException: processAction method not implemented
at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:192) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:439) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:82) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:256) ~[portal-kernel.jar:?]
...
Caused by: javax.portlet.PortletException: processAction method not implemented
at javax.portlet.GenericPortlet.processAction(GenericPortlet.java:223) ~[portlet.jar:3.0.1]
at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:187) ~[portal-kernel.jar:?]
... 191 more
Environment
- Liferay DXP 7.1+.
Resolution
- One of the causes could be that the action name used in the url is not declared or have a different name.
- For example, if we define:
@ProcessAction(name="submitMyAction")
We should declare the same name in the url:
...submitMyAction - Another example would be within a MVCActionCommand at the time of specifying the property mvc.command.name:
@Component(
immediate = true,
property = {
"javax.portlet.name=" + JournalPortletKeys.JOURNAL,
"mvc.command.name=/journal/add_folder"
},
service = MVCActionCommand.class
)
public class AddFolderMVCActionCommand extends BaseMVCActionCommand {
@Override
protected void doProcessAction(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
...
}
...
}The value of this property should be same of the URL parameter MyPortlet_javax.portlet.action