Message Boards

No Resource Found Exception

Arun Pandian, modified 4 Years ago.

No Resource Found Exception

Junior Member Posts: 72 Join Date: 9/26/19 Recent Posts
Hi, I am getting
com.liferay.portal.kernel.exception.NoSuchResourceActionException: There are no actions associated with the resource com.post.entity.model.PostEntity

When running

  resourceLocalService.addResources(postEntity.getCompanyId(), postEntity.getGroupId(), postEntity.getUserId(),
                PostEntity.class.getName(), postEntity.getPostId(), false, true, true);

Can some one tell me how to add my post entity to resourcesLocalService
thumbnail
Olaf Kock, modified 4 Years ago.

RE: No Resource Found Exception

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Arun Pandian:

Hi, I am getting
com.liferay.portal.kernel.exception.NoSuchResourceActionException: There are no actions associated with the resource com.post.entity.model.PostEntity
Did you register permissions with your entity? E.g. did you create a default.xml with a list of permissions associated with that entity?
Arun Pandian, modified 4 Years ago.

RE: No Resource Found Exception

Junior Member Posts: 72 Join Date: 9/26/19 Recent Posts
No i didnt create any .xml file in my service is there any documentation available for that?
thumbnail
Olaf Kock, modified 4 Years ago.

RE: No Resource Found Exception

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Arun Pandian:

No i didnt create any .xml file in my service is there any documentation available for that?
https://portal.liferay.dev/docs/7-2/tutorials/-/knowledge_base/t/defining-permissions