How to call custom method from different module in **localServceiIml class?How to call custom method from different module in **localServceiIml class?https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1216234962024-03-28T10:50:41Z2024-03-28T10:50:41ZRE: RE: How to call custom method from different module in **localServceiIml class?Razeena Phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1216265842023-01-11T17:21:08Z2023-01-11T06:33:56Z<p>Thank you Olaf Kock for the reply, yes I have added @Component and
it's working fine now.</p>Razeena P2023-01-11T06:33:56ZRE: How to call custom method from different module in **localServceiIml class?Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1216239762023-01-22T15:37:51Z2023-01-03T17:35:23Z<p>Is your<span style=""> SchedulerNewLocalServiceImpl annotated as
@Component? @Reference does only work inside of @Components.</span></p>
<p>Also, don't add the other module as dependency - its API should be enough</p>Olaf Kock2023-01-03T17:35:23ZHow to call custom method from different module in **localServceiIml class?Razeena Phttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1216234952023-01-03T17:33:19Z2023-01-03T08:03:44Z<p>Hi All,</p>
<p>I have created a new SB and now I want to call a method from
different module in my ***localServiceImpl. I have added a dependecy
of the module in my service.When I tried as below I'm getting the
nullpointer exception. Here "AutoPaymentScheduler" is there
inside the other module. Please help me out to solve this issue.</p>
<pre>
public class SchedulerNewLocalServiceImpl extends SchedulerNewLocalServiceBaseImpl {
public void AutoPaymentSchedulerCall (String cronExpression){
if(Validator.isNotNull(cronExpression)){
_autoPayScheduler.initJob(cronExpression);