Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
BeanLocator is not set in liferay 7.1
I am getting "BeanLocatorException" when calling GroupLocalServiceUtil.getFriendlyURLGroup(companyId, friendlyUrl) with valid arguments in liferay 7.1..The useful info about stacktrace is as follows:-
com.liferay.portal.kernel.bean.BeanLocatorException:
BeanLocator is not set
at
com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:74)
at com.liferay.portal.kernel.service.GroupLocalServiceUtil.getService(GroupLocalServiceUtil.java:2508)
I went through several threads and tried with methods for groupLocalService using @Reference annotation but to no avail..Please help me in this approach..Your suggestions would be highly appreciated ...Thanks in advance..
Abhishek Jain:I am getting "BeanLocatorException" when calling GroupLocalServiceUtil.getFriendlyURLGroup(companyId, friendlyUrl) with valid arguments in liferay 7.1..The useful info about stacktrace is as follows:-
com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator is not set
at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:74)
at com.liferay.portal.kernel.service.GroupLocalServiceUtil.getService(GroupLocalServiceUtil.java:2508)I went through several threads and tried with methods for groupLocalService using @Reference annotation but to no avail..
Please show the relevant part of your code, and the stacktrace down to your own call.
Note that you shouldn't call GroupLocalServiceUtil any more if you write an OSGi bundle plugin. Rather call the direct @Reference to groupLocalService.
Powered by Liferay™