Message Boards
javax.portlet.security-role-ref issue
javax.portlet.security-role-ref issue
Expert Posts: 326 Join Date: 12/20/10 Recent Postshi
in my mvcportlet's notation, i use Administrator and some roles in javax.portlet.security-role-ref, like follows
@Component(immediate = true, property = {
"com.liferay.portlet.display-category=category.raritan.scm"
//, "javax.portlet.version=3.0"
, "com.liferay.portlet.header-portlet-css=/css/main.css"
, "com.liferay.portlet.instanceable=true"
, "javax.portlet.display-name=SCMRaritan"
, "javax.portlet.init-param.template-path=/"
, "javax.portlet.init-param.view-template=/view.jsp"
, "javax.portlet.name=" + SCMRaritanPortletKeys.SCMRARITAN
, "javax.portlet.resource-bundle=content.Language"
, "javax.portlet.security-role-ref="
+Constant.STANDARD_PORTAL_ROLE_ADMINISTRATOR
+","+Constant.CUSTOM_PORTAL_ROLE_RARITAN_ME_GENERIC
+","+Constant.CUSTOM_PORTAL_ROLE_RARITAN_ME_MANAGER
}, service = Portlet.class)
but i got exception
2021-03-30 06:12:25.504 ERROR [pipe-start 1359][PortletImpl:2927] Unable to link role for portlet [] with role-name [Administrator] because role-link is null
2021-03-30 06:12:25.504 ERROR [pipe-start 1359][PortletImpl:2927] Unable to link role for portlet [] with role-name [ME Manager] because role-link is null
2021-03-30 06:12:25.505 ERROR [pipe-start 1359][PortletImpl:2927] Unable to link role for portlet [] with role-name [ME Generic] because role-link is null
i am very sure the roles already in role_ table. and i also know in 6.2, i have to modify liferay-portlet.xml file, but now, i do not have it.
should i create it? or what should i do for this issue?
thank you
RE: javax.portlet.security-role-ref issue
Expert Posts: 326 Join Date: 12/20/10 Recent Postsi find the answer, i modify the liferay-portlet.xml in <liferay home>/tomcat-9.0.37/webapps/ROOT/WEB-INF
it works
i leave the thread for who have same qustion.
have a nice day