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

StartUpAction fails to create Resources in hook plugin

    Details

      Description

      I'm migrating some Portlet plugins from 6.0.6 to 6.1.1
      In have a StartUpAction class that extends SimpleAction - I use it to create some missing Resources during the startup of the Portal.

      Since Version 6.0.6 all goes well but starting 6.1.1, from the StartUpAction class in the hook plugin I get below error:

      "com.liferay.portal.ResourceActionsException: There are no actions associated with the resource o2.base.model.<myResource>"

      It seems that during the StartUp of the Portal there is no visibility to the permissions defined in the "resource-actions/defaul.xml" file ....

      Of course I have the "resource-actions/defaul.xml" definition file in place - below a snippet adapted for the 6.1.1:

      ---------------------------------------
      <site-member-defaults>
      <action-key>VIEW</action-key>
      </site-member-defaults>
      <guest-defaults>
      </guest-defaults>
      .....
      ---------------------------------------

      In the <package>.service.impl/<myResource>LocalServiceImpl.java I have the below code:
      resourceLocalService.addResources(
      tabella.getCompanyId(),
      tabella.getGroupId(),
      serviceContext.getUserId(),
      OMTabella.class.getName(),
      tabella.getPrimaryKey(),
      false,
      true,
      true);

      Anyone got the same ? Thank you in advance !

      Ivano C.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 21 weeks, 4 days ago

                Packages

                Version Package
                6.2.0 CE M4