<?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>Running Service Builder methods outside the Portlet</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113631619" />
  <subtitle>Running Service Builder methods outside the Portlet</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113631619</id>
  <updated>2026-04-04T01:04:55Z</updated>
  <dc:date>2026-04-04T01:04:55Z</dc:date>
  <entry>
    <title>RE: Running Service Builder methods outside the Portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113636940" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113636940</id>
    <updated>2019-05-15T04:33:44Z</updated>
    <published>2019-05-15T04:33:44Z</published>
    <summary type="html">Service builder is an integral part of Liferay core leveraging both Spring and Hibernate.&lt;br /&gt;&lt;br /&gt;What you&amp;#39;re attempting would be extremely difficult to do, if not impossible, simply because of all of the assumptions the core makes about running within an app server, the web app context, ...&lt;br /&gt;​​​​​​​</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-05-15T04:33:44Z</dc:date>
  </entry>
  <entry>
    <title>Running Service Builder methods outside the Portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113631618" />
    <author>
      <name>Kevin Neibarger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113631618</id>
    <updated>2019-05-14T15:39:44Z</updated>
    <published>2019-05-14T15:39:44Z</published>
    <summary type="html">So, I&amp;#39;ve created a standalone Java driver class with a main method to test some DB data. I want to call and run service-builder methods within Eclipse. What do I need to add to the Run Configuration to avoid the error:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;BeanLocator has not been set for servlet context &amp;lt;PORTLET&amp;gt;&lt;/strong&gt;&lt;br /&gt;This happens when I try to call a method from a *&lt;strong&gt;LocalServiceUtil.java &lt;/strong&gt;class. </summary>
    <dc:creator>Kevin Neibarger</dc:creator>
    <dc:date>2019-05-14T15:39:44Z</dc:date>
  </entry>
</feed>
