<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Spring mvc portlet not able access customlocalservice</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121477171" />
  <subtitle>Spring mvc portlet not able access customlocalservice</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121477171</id>
  <updated>2026-04-06T00:48:02Z</updated>
  <dc:date>2026-04-06T00:48:02Z</dc:date>
  <entry>
    <title>Spring mvc portlet not able access customlocalservice</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121477170" />
    <author>
      <name>srini vasulu</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121477170</id>
    <updated>2022-07-25T15:26:44Z</updated>
    <published>2022-07-25T15:26:43Z</published>
    <summary type="html">&lt;p&gt;Hi ,&lt;br /&gt; In liferay 7.4.3.6 CE GA6 Created using spring MVC
  portlet  and trying to access the custome table entity inside in
  action class but not able to access&lt;br /&gt; when i write
  List&amp;lt;Employee&amp;gt; employee =
  EmployeeLocalServiceUtil.getEmployee(-1,-1); like this then getting
  the below error&lt;br /&gt; java.lang.NullPointerException&lt;br /&gt;     at com.service.EmployeeLocalServiceUtil.getEmployee(EmployeeLocalServiceUtil.java:294)&lt;/p&gt;
&lt;p&gt;if i will try defernt way &lt;/p&gt;
&lt;p&gt;@Reference&lt;br /&gt; private SubmittalLocalService _submittalService;&lt;/p&gt;
&lt;p&gt;List&amp;lt;Submittal&amp;gt; Submittal1 =
  _submittalService.getSubmittals(-1, -1);&lt;br /&gt; here _submittalService
  is getting the null value and not able to proceed&lt;/p&gt;
&lt;p&gt;in gradle service using like below&lt;br /&gt; compile project(&amp;quot;:modules:employee-service:employee-service-api&amp;quot;)&lt;/p&gt;
&lt;p&gt;Is it required any more configurations?&lt;/p&gt;
&lt;p&gt;Note: it's working fine in liferay module only issue in spring mvc portlet&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Srini&lt;/p&gt;</summary>
    <dc:creator>srini vasulu</dc:creator>
    <dc:date>2022-07-25T15:26:43Z</dc:date>
  </entry>
</feed>
