留言板

issue in writing custom sql in liferay 7.

thumbnail
Tahir Noor Khaliq,修改在7 年前。

issue in writing custom sql in liferay 7.

Junior Member 帖子: 35 加入日期: 15-2-5 最近的帖子
Hi,
I followed below blog to write custom sql in liferay 7.

https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/custom-sql

But when i am trying to access EntityFinderUtil.getTahirNoorKhaliq(); from XXXLocalServiceImpl Class it throws below exception

06:38:55,836 INFO [http-nio-8080-exec-9][ClpSerializer:71] Unable to locate deployment context from portlet properties
06:38:55,837 ERROR [http-nio-8080-exec-9][PortletBeanLocatorUtil:42] BeanLocator is null for servlet context create-custom-sql-service
com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator is not set for servlet context create-custom-sql-service

create-custom-sql is name of my SB module.
thumbnail
David H Nebinger,修改在7 年前。

RE: issue in writing custom sql in liferay 7.

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Tahir Noor Khaliq:
But when i am trying to access EntityFinderUtil.getTahirNoorKhaliq(); from XXXLocalServiceImpl Class it throws below exception


Why are you calling the static util class? Service builder classes already have references to everything they need.
thumbnail
Tahir Noor Khaliq,修改在7 年前。

RE: issue in writing custom sql in liferay 7.

Junior Member 帖子: 35 加入日期: 15-2-5 最近的帖子
Thanks
David H Nebinger.
Issue Resolved.